Performance problems OpenERP?
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
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
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 ??