mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
![]() The mergebot page become a bit slow with the years, it is time to make small optimisation to speed up thinks a little. Note: all changes where applied modifying the views or adding index by hand. There is still room for improvement but it would need more in depth refactoring, mainly adding specialized computed fields to enable a better batching. The first issue was using branch.staging_ids branch.staging_ids.sorted(lambda s: s.staged_at, reverse=True)[:6] The number of staging_ids is increasing and prefetching + sorting all of them is slow. The proposed solution is to replace it by a search, not ideal, a specialized compute field may be a good idea, but this is a quick fix that can be done editing a view. branch.env['runbot_merge.stagings'].search([('target', '=', branch.id)],order='staged_at desc', limit=6) Other changes are just index on critical columns. Before changes, /runbot_merge page takes ~5s to load After changes, /runbot_merge page takes ~1s to load Small note: note 100% sure that runbot_merge.batch.target was useful |
||
---|---|---|
.. | ||
configuration.xml | ||
mergebot.xml | ||
queues.xml | ||
res_partner.xml | ||
runbot_merge_project.xml | ||
templates.xml |