Thursday, June 27, 2024
1 change · saas-17.1
Enhancements to existing features
Point of Sale now avoids repeating an expensive price-list lookup for every product when preparing product pricing. This should make product and price loading faster, especially for stores with larger product catalogs.
Original PR description
This commit moves a call to `_loadMissingPricelistItems` within the `computeProductPricelistCache` method of `PosStore` outside of a for loop. This is done because it only needs to be called once for the products, not once for each product. `_loadMissingPricelistItems` calls `pos.session/get_pos_ui_product_pricelist_item_by_product`, which can be an expensive call. This commit minimizes how many times it's called. opw-3928634