Skip to content

Conversation

@NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Apr 22, 2023

Atm, when rendering 1000 elements, using Resources here is almost twice as slow as the non-resource version.
The added test, it can render many elements, (on my laptop) takes about 2.5s on the main branch, and 3.8s on this branch.
Until that is resolved, we probably can't merge this.

(Also, even before this PR, that's very slow -- will need to test again with a production build, but even in development 1000 elements is nothing)

Will need to do some analysis


Still WIP, I want to add more tests, and get confirmation on direction.

I also haven't been able to get anything related to pnpm dev running on this machine due to

innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /✂️/starbeam/node_modules/.pnpm/[email protected]/node_modules/node-pty/lib/unixTerminal.js
- /✂️/starbeam/node_modules/.pnpm/[email protected]/node_modules/node-pty/lib/index.js}

but, idk, maybe the issue will go away in a floating dep update later 😅

This PR also adds typescript to both the vanilla and vanilla/tests package.jsons.
This was required for running pnpm test:types in the vanilla and vanilla tests directories, as well as getting lsp support in my editor (I opened only to the vanilla folder, because I didn't want the rest of the repo adding to memory consumption of my machine (lsp, etc))

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@NullVoxPopuli NullVoxPopuli changed the title Resourced based vanilla renderer Resource based vanilla renderer Apr 22, 2023
@NullVoxPopuli NullVoxPopuli force-pushed the resourced-based-vanilla-renderer branch from 5e93b04 to ee4d928 Compare April 22, 2023 04:49
@@ -1,57 +1,77 @@
/**
* TODO:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some todos from our convo the other day

text: Reactive<string>,
description?: string | Description
): ContentNode {
return ContentNode(({ into }) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed this to just Content, because the type overload was breaking my brain, especially since the two ContentType's weren't exactly referring to the same function

const formula = CachedFormula(() => (use(blueprint, { lifetime: owner, metadata: { owner } })).current, description);

RUNTIME.onFinalize(owner, cleanup);
RUNTIME.onFinalize(owner, () => void RUNTIME.finalize(formula));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this is right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant