Daily updates from Odoo
Friday, January 26, 2024
2 changes
Enhancements to existing features
This fix eliminates redundant data evaluations when spreadsheets load multiple data sources simultaneously, dramatically improving performance. In real-world scenarios with many data sources, spreadsheet loading time is reduced from 33 seconds to 7 seconds. The trade-off is that cells will show "Loading..." until all data sources are ready, rather than updating incrementally.
Original PR description
In a spreadsheet with multiple data sources (2 pivots), each data source initially loads and triggers a new evaluation upon loading. This results in two evaluations, even if both data sources resolve…
In a spreadsheet with multiple data sources (2 pivots), each data source initially loads and triggers a new evaluation upon loading. This results in two evaluations, even if both data sources resolve in less than 10ms apart. In such cases, the first re-evaluation becomes redundant, as a new one is immediately triggered. The issue is worse when more than 6 RPCs are required, as most browsers limit network calls to 6 in parallel. Consequently, the 7th RPC will unnecessarily wait after the evaluation triggered by the first RPC to resolve. For spreadsheets with many many data sources, the accumulation of these pointless evaluations significantly impacts performance. In a real-life scenario with 18 data sources from our production database, the spreadsheet took approximately ~33s to fully load and become reactive. With this commit, the loading time is reduced to ~7s (only one evaluation instead of 18). Note that this testing was conducted locally, with minimal latency, and with a limited amount of data. One consequence of this commit is that cells won't load incrementally as each data source loads. Instead, all cells will display "Loading..." until all data sources are loaded. Given the substantial speed improvement, we consider this trade-off worthwhile. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149767
This update significantly improves the speed of select menus when working with forms containing many options. Previously, the system was unnecessarily re-sorting menu options every time the page loaded, causing delays and potential browser crashes. Now sorting only happens when the menu opens, making selections and deletions up to 20 times faster in real-world scenarios.
Original PR description
## Description Having several select menu containing a lot of options on a page may lead to significant wait times and browser crashes when selecting or deleting a value. ## Analysis Sorting of the…
## Description Having several select menu containing a lot of options on a page may lead to significant wait times and browser crashes when selecting or deleting a value. ## Analysis Sorting of the options is being computed on each mounted select menu during the useEffect() hook since this commit: https://github.com/odoo/odoo/commit/8a4485748f49c5b8fdb780b0bcd2435eeadd63b. ### Before this commit All of the select menu are sorted when the user select a value in one of them. This is not necessary as the sorting is already handled in beforeOpen. ### After this commit Selecting or deleting a value from a select menu is significantly faster as the sorting is not being unnecessarily computed in useEffect() anymore. ## Benchmarks When importing an Excel file containing 70 columns as an invoice with subfields search enabled, selecting/deleting an option from a select menu: | | Before | After | |-------------|---------|--------| | Selecting | 31.2 s | 1.5 s | | Deleting | 35.9 s | 1.6 s | ## References opw-3616438 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#146324