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

An initial work on a dependency tree for formulas #2155

Merged
merged 1 commit into from Aug 30, 2023
Merged

Conversation

jahav
Copy link
Member

@jahav jahav commented Aug 30, 2023

The tree can mark formulas as dirty, if some precedent (direct/transitive) cell is changed.

The chosen data structure is an R-tree. R-tree seems to be the only reasonable structure (other than the variant R*-tree) for orthogonal range searching for overlapping ranges, most other are point vs range or "variants" of the main algorithm that is intended for other things (e.g. kd-tree).

R-tree has an implementation in form of RBush library. It isn't strongly named and won't be, will need to make a fork or abandon strong naming.

This is only initial work, will need to be improved to deal with

  • adding/removing formulas in sheets
  • name dependencies
  • include to workbook (currently is apart and unused)
  • workbook modifications (adding/renaming/removing sheet, adding rows, removing rows, shifting) - will likely just recreate from scratch if needed when it happens. There is no time do it more accurately currently.

…formulas as dirty, if some precedent (direct/transitive) cell is changed.

The chosen data structure is an R-tree. R-tree seems to be the only reasonable structure (other than the variant R*-tree) for orthogonal range searching for overlapping ranges, most other are point vs range. Others are mostly "variants" of the main algorithm that is intended for other things (e.g. kd-tree).
@jahav jahav added this to the v0.103 milestone Aug 30, 2023
@jahav jahav merged commit 38811f4 into develop Aug 30, 2023
4 checks passed
@jahav jahav deleted the dependency-tree branch August 30, 2023 22:18
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