Friday, May 10, 2024
2 changes · 17.0
Enhancements to existing features
This update makes the "is_kits" product field searchable, allowing users to easily find all product kits in their database. Previously, this field could not be searched, which was inconvenient for businesses with large product catalogs. The change also fixes a technical issue where the field was unnecessarily computed with elevated permissions.
Original PR description
Description of the issue/feature this PR addresses: Before this PR the field is_kits is not searchable. It is useful in large database to find all product kit easely. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#163830 Forward-Port-Of: odoo/odoo#156019
This update significantly improves the speed of loading the Discuss app when users have many pinned chats. The change optimizes how the system processes chat data, resulting in 50-70% faster load times depending on the number of pinned conversations. Users with large numbers of pinned chats will experience noticeably quicker access to their messaging interface.
Original PR description
Before this commit, when a user had many discuss chats pinned on the UI (i.e. in Discuss app Sidebar or in Messaging Menu), then the initial loading of Discuss could be very slow. This initial…
Before this commit, when a user had many discuss chats pinned on the UI (i.e. in Discuss app Sidebar or in Messaging Menu), then the initial loading of Discuss could be very slow. This initial loading happens at page load in version 17.0. This happens because when inserting the pinned thread data, the inner-working of computed fields related to Thread models was taking a lot of time. This comes from poor coding in ensuring computed fields are registered once in a single `Record.insert()` transaction: this uses an array, so it had to be fully parse to check whether it was present. This commit fixes the issue by using a `Set` instead of an array for the FC_QUEUE (the inner-queue of registered fields to compute), so that checking presence of field is an O(1) time rather than O(n). Note that arrays are fast so it needs a lot of threads and a lot of computed fields to see a big performance problem. In version 17.0: 200 pinned threads: 600ms => 400ms (50% faster) 1k6 pinned threads: 8.85s => 5.25s (70% faster)