Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource based vanilla renderer #99

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

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/node-pty@0.10.1/node_modules/node-pty/lib/unixTerminal.js
- /✂️/starbeam/node_modules/.pnpm/node-pty@0.10.1/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))

@stackblitz
Copy link

stackblitz bot commented Apr 22, 2023

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

}

export function Comment(
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


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