Daily updates from Odoo
Thursday, July 25, 2024
1 change
Resolved issues and error corrections
This update significantly improves the speed of loading call activities in the VoIP system. The system was processing activities inefficiently by repeating the same data lookups for each individual activity. We've optimized this to process all activities together in one batch, reducing processing time by nearly 85% (from 581 seconds to 84 seconds for typical usage).
Original PR description
We notice that get_today_call_activities is a very frequent call that spend a lot of time runing sql queries. during 1h30 it was called 20515 times for an average of 719ms of sql times on odoo.com database. It was cause by _format_call_activities which can be called with many hundreds of activities before this commit for each activity _mail_get_partners and mail_partner_format were called once per activity. It take 581s for all the internal user of odoo.com database after this commit the method _mail_get_partners and mail_partner_format are called for an entire batch as it's intended. The same computation for internal user takes now 84s