-
Notifications
You must be signed in to change notification settings - Fork 32
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] 16.0 perf 3588401 lul #3209
Conversation
@LucasLefevre @rrahir cherrypicking of pull request #3147 failed. stderr:
Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?). In the former case, you may want to edit this PR message as well. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
This commit caches string normalization used in lookup functions. `normalizeString` is called for every element of lookup ranges. Those ranges can be large. In the production spreadsheet mentionned on the ticket, it was taking more than 13% of the loading time. Now it's 0.0% `normalizeString` was called 19M times while it has only 664 different input values. opw-3588401 Task: 3588401
With this commit, the range arrays are created with their final size. On the ticket spreadsheet, `range` self-time goes from ~21.4% to ~17.4% opw-3588401
When a function references a range `=SUM(A1:B10)`, a new 2d array is rebuilt with the cell values for every range in every functions. However, for LOOKUP functions, it's very likely to have many cells with a LOOKUP function looking for a match in the exact same range. In the customer spreadsheet, `range` self-time goes from ~15% to almost nothing (0.2%). There's another spreadsheet where many cells references the same range with 100k cells. Loading the spreadsheet was taking 26s before and 7s after. opw-3588401 Task: 3588401
d154353
to
00e88e9
Compare
fw-bot r+ |
@LucasLefevre I can only do this on unmodified forward-port PRs, ask robodoo. |
robodoo r+ |
This commit caches string normalization used in lookup functions. `normalizeString` is called for every element of lookup ranges. Those ranges can be large. In the production spreadsheet mentionned on the ticket, it was taking more than 13% of the loading time. Now it's 0.0% `normalizeString` was called 19M times while it has only 664 different input values. opw-3588401 Task: 3588401 Part-of: #3209
With this commit, the range arrays are created with their final size. On the ticket spreadsheet, `range` self-time goes from ~21.4% to ~17.4% opw-3588401 Part-of: #3209
When a function references a range `=SUM(A1:B10)`, a new 2d array is rebuilt with the cell values for every range in every functions. However, for LOOKUP functions, it's very likely to have many cells with a LOOKUP function looking for a match in the exact same range. In the customer spreadsheet, `range` self-time goes from ~15% to almost nothing (0.2%). There's another spreadsheet where many cells references the same range with 100k cells. Loading the spreadsheet was taking 26s before and 7s after. opw-3588401 closes #3209 Task: 3588401 Signed-off-by: Rémi Rahir (rar) <rar@odoo.com> Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Description:
description of this task, what is implemented and why it is implemented that way.
Task: : 3588401
review checklist
Forward-Port-Of: #3147