Community: Framework mailing list archives

Browse() vs read() performance in Odoo 8

- 11/05/2014 17:32:40
Hi all.

When developing with the API 7, I always prefer the read() instead of the browse() method.
Indeed it seems that a browse fetches all the fields in the table, whereas the read fetches only the few it needs (that are passed to them), thus resulting in a much faster speed.

Actually I never really liked it, because it is easier/more intuitive to use the browse, and the code is nicer.

So what about performance issues in Odoo8?
Is it still recommended to prefer the read() in the API 8?

It would be a shame, moreover now because the browse() in the new API seems so much easier to use.

Thanks for your hints,