Friday, March 28, 2025
1 change · saas-18.1
Enhancements to existing features
Point of Sale now reuses previously calculated pricelist rules instead of recalculating them repeatedly. This makes adding products to the cart much faster for businesses with large or complex pricelists.
Original PR description
## Issue When a client has a lot of pricelist rules, the PoS can be slow (e.g. when adding a product to the cart). ### Analysis This is due to the filtering of pricelist rules, which is recomputed on each rendering. ### Solution To solve this, we cache them per pricelist so we only compute them once. ## Benchmarks Profiling `addLineToCurrentOrder` when adding a product to a cart: | # pricelist.item_ids | Before | After | Percentage | ---------------------- | --------- | --------|------------------ | | 21650 | 2350 ms | 6 ms | 99% | ### References opw-4611027 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr