Code review comment for lp:~openerp-dev/openobject-server/6.0-opw-577963-msh

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

This is not correct, the logic for filtering based on access rights was already done efficiently.
Your patch makes it check the access right of only 1 document of each model, but every document may have different access restrictions depending on access rules (e.g. multicompany, etc.).

BTW the OPW case has already been closed and a different patch was merged, so you don't need to work on this anymore.
The bulk of the performance problem with large databases was caused by the numerous calls to list.remove(), which are very slow on large lists. Using a set() instead made it a lot faster (50s -> 3s for a real database with 100k random attachments). Your measures were a lost faster than that, probably because most attachments were duplicates and therefore attached to the same (model,res_id) - biasing the result heavily.

Thanks,

PS: why did you review your own MP with "Abstain"?

review: Disapprove

« Back to merge proposal