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

[wip] push nodes impl #53

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

[wip] push nodes impl #53

wants to merge 3 commits into from

Conversation

ds300
Copy link
Contributor

@ds300 ds300 commented Mar 7, 2023

This PR maybe adds eagerly-updated 'push' nodes, which can be used selectively to avoid traversing sections of the graph, and to set historyLength to 1 in some cases.

when you call atom.set, whether in a transaction or not, if the atom has any direct 'push' children, those children will be updated immediately. And if those children have any direct 'push' children they will also be updated immediately, and so on.

Then when the final reaction sweep is done when the root transaction commits, if a push node is encountered which did not change during the transaction, it is not traversed.

Before merging:

  • Need to make sure that this actually performs better in some situations
  • Add numPushyChildren to atoms/computeds to allow avoiding push traversal. Or maybe use a separate lazily-instantiated ArraySet?

@ds300 ds300 self-assigned this Mar 7, 2023
@vercel
Copy link

vercel bot commented Mar 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
signia ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 13, 2023 at 9:48AM (UTC)

@ds300 ds300 temporarily deployed to auto deploy March 7, 2023 13:52 — with GitHub Actions Inactive
@ds300 ds300 temporarily deployed to auto deploy March 8, 2023 16:21 — with GitHub Actions Inactive
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.

None yet

1 participant