Comment 8 for bug 1177965

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : Re: Overall performance issue of BaseModel.fields_view_get

Hi Rikafat,

Thanks for your confirmation and acknowledgement.

I'm very conscious that it is by no means a trivial fix and it could be hard / risky to change in stable version.

However, while the loading of 50 partners with a 2mb image taking 8 seconds is bad, I think we can live with it because the chances to have such a configuration seems low, at worse we'll have a mitigation of small and big images.

Mine concern here is more on the upload of a big image on a user account. If I upload a 2mb image on my own user, each time I click on a menu, it will take ~8 seconds to load. This is discouraging and makes the usage of OpenERP almost unusable for this user.

The thing is that, you know it as well as I do, we cannot prevent users to upload big images.

All that being said, I think that 2 actions could be done in the stable version while doing a mechanism to restrict pre-fetching in trunk:

 - Replace the `browse` by a `read` as I did in `res_company._company_default_get()` -> this method is called several times each time we display a view and this single change drastically reduces the loading time when a big image is used (even if a small image is used, it will improve the performance here). Note that other `browse` of the user may have the same issue but this is the one I spotted and come the more often.

 - Prevent the upload of a image too large or resize it if it is too large.

In my opinion, this is an acceptable mitigation of the issue for the stable version while a better one is done in trunk.

What do you think?
Thanks

Guewen