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
[FW][PERF] evaluation: faster dependencies checking #4117
Closed
fw-bot
wants to merge
2
commits into
saas-17.1
from
saas-17.1-saas-16.4-faster-dependencies-lul-lPwD-fw
Closed
[FW][PERF] evaluation: faster dependencies checking #4117
fw-bot
wants to merge
2
commits into
saas-17.1
from
saas-17.1-saas-16.4-faster-dependencies-lul-lPwD-fw
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
X-original-commit: 2460e64
This commit improves the performance of a pathological case of the dependency finding algorithm. Let's say All cells in column B depends on A1 (each cell in B contains a formula referencing A1). All cells in column C depends on every cell in B What happens when we update A1: the first `while` iteration finds all cells in B, which are pushed in the process queue (B1, B2, B3, B4, ...). At the next iteration, the code searches for the dependencies of B1 and adds them to the queue (now B2, B3, B4, ..., C1, C2, C3, ...) The next iteration, we search for the dependencies of B2 which are again C1, C2, C3,... They are not pushed to the queue because we already visited them, but we still have to process them. Next is the dependencies of B3...again C1, C2, C3, ... We process over and over again the same positions. With this commit, we no longer process individual positions one after the other. We first group positions in bigger zones. With the example above, we would have grouped B1, B2, B3, ... into a single zone with the the entire B column. Hence we do a single `this.rTree.search` rather one per position. On RNG's spreadsheet, `getCellsDependingOn` total time goes from 12+ secondes to <180ms, (~90% to ~10%) when updating certain cells with the describe dependency configuration. Task: 3874821 X-original-commit: b0e0ff3
This PR targets saas-17.1 and is part of the forward-port chain. Further PRs will be created up to master. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
@LucasLefevre @rrahir the next pull request (#4118) is in conflict. You can merge the chain up to here by saying
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
@fw-bot r+ |
robodoo
pushed a commit
that referenced
this pull request
Apr 23, 2024
This commit improves the performance of a pathological case of the dependency finding algorithm. Let's say All cells in column B depends on A1 (each cell in B contains a formula referencing A1). All cells in column C depends on every cell in B What happens when we update A1: the first `while` iteration finds all cells in B, which are pushed in the process queue (B1, B2, B3, B4, ...). At the next iteration, the code searches for the dependencies of B1 and adds them to the queue (now B2, B3, B4, ..., C1, C2, C3, ...) The next iteration, we search for the dependencies of B2 which are again C1, C2, C3,... They are not pushed to the queue because we already visited them, but we still have to process them. Next is the dependencies of B3...again C1, C2, C3, ... We process over and over again the same positions. With this commit, we no longer process individual positions one after the other. We first group positions in bigger zones. With the example above, we would have grouped B1, B2, B3, ... into a single zone with the the entire B column. Hence we do a single `this.rTree.search` rather one per position. On RNG's spreadsheet, `getCellsDependingOn` total time goes from 12+ secondes to <180ms, (~90% to ~10%) when updating certain cells with the describe dependency configuration. closes #4117 Task: 3874821 X-original-commit: b0e0ff3 Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
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.
On RNG's spreadsheet, from 12+ secondes to <180ms
Task: 3874821
Description:
description of this task, what is implemented and why it is implemented that way.
Task: : TASK_ID
review checklist
Forward-Port-Of: #4093