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][FIX] *: Compute max/min on huge arrays #3951
Conversation
@rrahir @LucasLefevre cherrypicking of pull request #3907 failed. stdout:
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 is an extension of PR #1217. Navigators (or rather javascript engines) have a limit to the number of function arguments [1]. We sometimes have to use Math.max and Math.min functions (which are subject to this limitation) on every cell/column/row which means that we are functionally limited. E.g. If we take the limitation of Chrome, we could only process 117k rows, which is not such a huge number if we consider the situation of a user importing their data. This revision introduces wrappers `largeMax` and `largeMin` which take an 1-D array (a single argument) and find the maximum (resp. minimum) present in that list. For arrays with les than a 100K cells, the wrapper will still call Math.max as its implementation is most of the time faster. [1]: Experimentally, that limit is 117k on Google Chrome and 501k on Firefox. Task: 3802691 X-original-commit: 9b7d8d9
4cab6b9
to
6e49e43
Compare
@robodoo r+ |
This is an extension of PR #1217. Navigators (or rather javascript engines) have a limit to the number of function arguments [1]. We sometimes have to use Math.max and Math.min functions (which are subject to this limitation) on every cell/column/row which means that we are functionally limited. E.g. If we take the limitation of Chrome, we could only process 117k rows, which is not such a huge number if we consider the situation of a user importing their data. This revision introduces wrappers `largeMax` and `largeMin` which take an 1-D array (a single argument) and find the maximum (resp. minimum) present in that list. For arrays with les than a 100K cells, the wrapper will still call Math.max as its implementation is most of the time faster. [1]: Experimentally, that limit is 117k on Google Chrome and 501k on Firefox. closes #3951 Task: 3802691 X-original-commit: 9b7d8d9 Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com> Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
This is an extension of PR #1217. Navigators (or rather javascript engines) have a limit to the number of function arguments 1.
We sometimes have to use Math.max and Math.min functions (which are subject to this limitation) on every cell/column/row which means that we are functionally limited.
E.g. If we take the limitation of Chrome, we could only process 117k rows, which is not such a huge number if we consider the situation of a user importing their data.
This revision introduces wrappers
largeMax
andlargeMin
which take an 1-D array (a single argument) and find the maximum (resp. minimum) present in that list. For arrays with les than a 100K cells, the wrapper will still call Math.max as its implementation is most of the time faster.Task: 3802691
Description:
description of this task, what is implemented and why it is implemented that way.
Task: : TASK_ID
review checklist
Forward-Port-Of: #3950
Forward-Port-Of: #3907
Footnotes
Experimentally, that limit is 117k on Google Chrome and 501k on Firefox. ↩