← Back to team overview

magentoerpconnect-community team mailing list archive

Optimization of product read method (really useful when more than 100 attributes)

 

Hi,


I started to work harder with the connector some weeks ago and already contribute to some little improvements. The problem I address here
concern the people who have lots of attributes in their Magento eshop.

When having more than 100 attributes, OpenERP start to be really slow with everything regarding the product (search form, list, ...).

So I overwrite the read method to avoid reading all unneeded fields. By default, I only read the "normal" product fields unless I found "set:ID" in the context.
In that last case, I only read the fields that composed the set. This work perfectly with every standard feature (browsing, searching, export catalog, etc..), but
could bring some trouble using the magento attributes in some reports. This could easily be adapted be passing the set:ID in the context.

After a phone call with Raphaël, as discussed, I post my patch here. I hope this will be useful for other people too. Apparently this won't be
included in the core for the above reason. So I will also maintain a branch here with the improvements:

bzr branch lp:~jgrandguillaume-c2c/magentoerpconnect/magentoerpconnect_optimized



Best regards,


Joël



-- 

Joël Grand-Guillaume 
Division Manager
Business Solutions

Camptocamp SA
PSE A, CH-1015 Lausanne
http://openerp.camptocamp.com/

Phone: +41 21 619 10 28
Office: +41 21 619 10 10
Fax: +41 21 619 10 00
Email: joel.grandguillaume@xxxxxxxxxxxxxx


Follow ups