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
Evaluate calculation chain #2172
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ormulas and thus a place to put other logic of keeping up the calculation chain, dirty flag and dependency tree up to date.
…ction. The primary reason is that DependencyTree should be part of CalcEngine and CalcEngine doesn't have workbook as a ctor dependency. At this time, injecting the ctor dependency is not good, because CalcEngine is used in many places without acces to workbook.
…dependency tree. Update array formula directly through formula slice instead of instantiating a cell each time.
…r major loop of recalculation into two loops. That should make it more readable.
…e used to find StackOverflowException.
… it from value slice.
…, recreate dependency tree and calculation chain completely, but in the future, both will be adjusted instead.
jahav
force-pushed
the
evaluate-calculation-chain
branch
from
September 25, 2023 22:34
ed21269
to
29ca8ae
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace the evaluation of a formula using a recursive algorithm with a calculation chain. Calculation chain evaluates a single formula at a time and if formula needs data from another formula, it stops evaluation of the current formula and reorders the chain, so the supporting formula is positioned before the dependent formula (that is also reason why first calculation is often slower-order is not yet determined, and also why is the chain is saved to the file).
Draft/WIP PR, needs TLS, but added, because I like looking at changes on GitHub.
Things that will be fixed later: