Daily updates from Odoo
Wednesday, March 13, 2024
1 change
Enhancements to existing features
The barcode scanning application now responds much faster when handling large orders with many line items, especially on mobile devices. This update optimizes how the system checks which line is selected, reducing processing time from 7.5 seconds to 600 milliseconds when working with 2,000 lines, making the app more responsive and user-friendly for warehouse staff.
Original PR description
When the barcode application has many lines, it becomes slow and unresponsive, especially on mobile devices, which are widely used with the barcode app. Before this commit: Selecting a line in the barcode application triggers the rendering of the whole view. Each line rendered calls the getter `get selectedLine` multiple times, which is slow as it loops over all lines to find the currently selected line. After this commit: Do not call the getter to check whether the current line is selected or not. This reduces the complexity from O(n^2) to O(n). Benchmark: On a laptop and with 2000 lines, selecting the last line took 7.5s before, and 600ms with this commit. opw-3754849 Forward-Port-Of: odoo/enterprise#58182