-
Notifications
You must be signed in to change notification settings - Fork 16
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
base: main
Are you sure you want to change the base?
Resource based vanilla renderer #99
Conversation
Run & review this pull request in StackBlitz Codeflow. |
…pe checking to work (in both terminal (cd'd, and editor))
5e93b04
to
ee4d928
Compare
@@ -1,57 +1,77 @@ | |||
/** | |||
* TODO: |
There was a problem hiding this comment.
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 }) => { |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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
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 themain
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 tobut, 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))