Odoo Help


Performance problems OpenERP?

on 4/3/14, 11:47 AM 4,282 views

Has anyone else noticed huge performance problems using OpenERP?

For example, when doing a large sales order, or a large manufacturing order, the delay times can be up to FIVE minutes (using amazon server). We have looked "under the hood" into the code and have discovered the overuse of the "browse" record, which essentially does massive DB reads for sometimes one simple field. For example, to retrieve the company ID of the user, the browse record reads 89 fields from the DB in order to retrieve that one simple piece of information! Repeatedly through the code is excessive use of the Browse record. Instead, OpenERP should be doing READS, which retrieve only the target information. Here is an example:

Example, in server/openerp/addons/base/res

Current (Browse)

def _get_image(self, cr, uid, ids, name, args, context=None):
            result = dict.fromkeys(ids, False)
            for obj in self.browse(cr, uid, ids, context=context):
                result[obj.id] = tools.image_get_resized_images(obj.image)
            return result

Optimized (Read)

def _get_image(self, cr, uid, ids, name, args, context=None):
        result = dict.fromkeys(ids, False)
        for obj in self.read(cr, uid, ids, ['image'], context=context):
            result[obj['id']] = tools.image_get_resized_images(obj['image'])
        return result

If you trace the code, you will see the browse function will create a select to read ALL (normal field) from the partner, but function need only one field: image. So in this case, use READ have the best performance, read only the field needed.

So my question is: Why openerp use Browse when Read have better performance ??

Nobody from openerp can answer ??

on 4/9/14, 3:47 PM

I've configured the system and products such that a manufacturing order will automatically generate dozens of requests for quotations. Sometimes, it takes hours for the RFQs to show up. I don't know if the system has been working all this time or if the time of day is important. We've just started seeing this problem.

Gilles Lehoux
on 6/10/14, 5:13 PM

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
Serpent Consulting Services Pvt. Ltd.
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 11/11/14, 3:25 AM

Please check if this helps - http://www.serpentcs.com/serpentcs-openerp-odoo-difference-of-read-and-browse-calls


On 11/11/14, 5:26 AM

Serge, Am also facing the performance issue similar to you but in a different perspective. My amazon server had 8 Gb of free space initially when i started OpenERP. It was working fair enough. But after a month server started responding slow and at a point it was completely full. Now i have extended the server space yet till now the server performance for each click takes minimum 10 seconds to load, which is very ambiguos. Is that related to that Browse funtion which needs to be altered ? or clearing the server log files will solve it ? Some expert answers required asap as we r in middle.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 4/3/14, 11:47 AM
Seen: 4282 times
Last updated: 3/16/15, 8:10 AM