Daily updates from Odoo
Friday, February 28, 2020
1 change · master
Resolved issues and error corrections
Pages with many follow buttons now load reliably by checking follow status in one combined request instead of thousands of separate calls. This prevents browser slowdowns or crashes on large forum tag pages and significantly reduces server traffic.
Original PR description
Before this commit, a JS widget would be instanciated for every `.js_follow` on
the page.
Every widget would then perform a RPC to know if the object was followed.
That would be an issue if there was too many `.js_follow` on the DOM.
Eg: on the forum tag page (/forum/1/tag), there might be unlimited tags. This
is where the biggest issue is ATM, on Odoo.com we have over 5500 tags,
which performs 5500 RPC.
Your browser will most of the time just crash.
This commit improves that behavior by sending only one RPC to get the tags info
in once.
With 5000 tags, there was 5000 RPCs, now there will only be one for the tags.
Also, each RPC were doing 8 requests each, so this will bring requests from
40.000 to 80.
Fixes #45576