Tuesday, January 23, 2024
1 change · 17.0
Enhancements to existing features
This update improves the performance of the website forum module by optimizing how the system retrieves the most recent post for each forum. Previously, the system made a separate database request for each forum, which was slow when viewing multiple forums. Now these requests are batched together into a single operation, making the forum pages load faster.
Original PR description
Computation of the last post shouldn't be done with a db request for each forum but can be batched. Technical note: As it is likely that `post_ids` is not yet fetched when we're accessing `last_post_id` we chose not to early return if no forum in `self` included posts already. Version choice: We chose this version to merge this as it is the one where forum was taken over, and _read_group refactored. A test for this computation is also added. Task-3685002 Forward-Port-Of: odoo/odoo#149376