Thursday, March 11, 2021
2 changes · master
Resolved issues and error corrections
Product variant naming was simplified by no longer hiding attributes that only have one possible value. This removes a slow check and significantly improves performance for large product catalogs, especially barcode lookups and product searches.
Original PR description
Method _filter_single_value_lines() in _get_combination_name() is aimed to filter out attributes that have a single value, e.g. no need specify product color in name if we sale one color only. It…
Method _filter_single_value_lines() in _get_combination_name() is aimed to filter out attributes that have a single value, e.g. no need specify product color in name if we sale one color only. It makes sense, but it works too slow. Because it doesn't seem that important we can drop it for sake of speed. Perfomance test =============== * 33 K product templates with 2 attributes and 2 values in each * 2 languages * postgres 12.5 ``` get_all_products_by_barcode | | Number of queries | Query time, sec | Remaining time, sec | |--------+-------------------+-----------------+---------------------| | Before | 33909 | 29.298 | 64.672 | | After | 671 | 7.108 | 26.787 | name_search limit=8 | | Number of queries | Query time, sec | Remaining time, sec | |--------+-------------------+-----------------+---------------------| | Before | 15 | 0.217 | 0.015 | | After | 10 | 0.211 | 0.011 | ``` --- Co-authored with FP opw-2459937 opw-2452738 opw-2355449 opw-2377443 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resizing a calendar window no longer forces the entire calendar to reload, so users keep their place instead of being sent back to the start. This also improves performance in related Time Off calendar views by avoiding unnecessary background work.
Original PR description
Before this commit, when a calendar view was resized the full view was rendered again to recalculate the resize. After this commit, we now set manually the new size. This avoid to lose the current position-y in the calendar. Steps to reproduce: * Open a window (not maximized) * Go to calendar (day/week view) * Scroll to the end of the calendar * Resize the window => the calendar returns to the begging. Note: By the same way it also fixes a performance issue in TimeOff's render as it makes an RPC to calculate the popover for the year view. Task ID: 2200168 (5.a) -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr