o0101 / good.html

💎 Good.HTML. A nice framework without the bad stuff. Lots of custom elements, and nice templates. Good. HTML
https://o0101.github.io/good.html/
MIT License
21 stars 2 forks source link

make reverse dependency graph for cell formula dependencies #35

Closed o0101 closed 3 years ago

o0101 commented 3 years ago

this is to save work when calculating the formulas

o0101 commented 3 years ago

we only need to update the formula if any of the cell that changed and triggered the recalculation

so we only need to compute the graph incrementally (or on initial load)

basically we do a topological sort on the graph to put the dependencies in the right order for resolution