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

Pool objects owned by Fiber #3

Open
AdamRamberg opened this issue Jul 16, 2023 · 0 comments
Open

Pool objects owned by Fiber #3

AdamRamberg opened this issue Jul 16, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@AdamRamberg
Copy link
Contributor

AdamRamberg commented Jul 16, 2023

This feature should be investigated and perf tested before being merged to main.

We are currently not pooling any objects, which we might want to do. The reason why I write might, is that it make sense for components that are mounted / unmounted often, but not for components that are only mounted once. Objects that could be pooled are:

  • Children
  • FiberNodes
  • Effects
  • Signals
  • Built in components
  • Refs

The idea is that the virtual node that defines all of the above (via for example F.Children) in its Render call also owns the object, meaning that when it is unmounted all object that it owns are released. A pre-requisite for this is that Signals and Refs are created by Fiber (via F).

@AdamRamberg AdamRamberg added the enhancement New feature or request label Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant