-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: allKeys computation is constrained by diff (#35303)
## Description allKeys is previously computed from the complete unevalTree, we used to recursively traverse through the entire unevalTree during each evaluation update cycle. We are optimising this by leveraging the diff which we have previously computed and using the diff to directly update the allKeys result. When delete based diffs detected are detected we are directly deleting the nodes in the previous allKeys result, for only new nodes we are recursively computing the allKeys for those nodes and merging it back to the previous allKeys result. The time complexity of the solution has improved by limiting iterations to the diff alone instead of computing the entire unevalTree. Fixes #35386 > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10220298181> > Commit: 12b94c3 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10220298181&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Fri, 02 Aug 2024 19:22:32 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Introduced a new function for dynamic path management based on differential updates. - Enhanced data processing in the DataTreeEvaluator class to improve dependency tracking and efficiency. - **Bug Fixes** - Improved handling of data tree updates to ensure accurate addition and deletion of paths. - **Tests** - Added a comprehensive test suite for the new path management function, verifying accurate response to various data tree changes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
3 changed files
with
172 additions
and
6 deletions.
There are no files selected for viewing
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
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
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