signia icon indicating copy to clipboard operation
signia copied to clipboard

[wip] push nodes impl

Open ds300 opened this issue 2 years ago • 1 comments

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 avatar Mar 07 '23 13:03 ds300

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)

vercel[bot] avatar Mar 07 '23 13:03 vercel[bot]