Load product attributes more performant

Recently I had performance issues when importing several ten tausend products. The problem was, that I always used the “normal” product entity model to load attribute values. The following snippet shows, how to load product attributes directly instead. Therefore I use the product resource singleton. <?php $iProductId = $aChange[‘pid’]; $oItem = new Varien_Object; /** * […]

Apache Cache Headers

Here are some nice Apache configuration entries that will increase your website performance. They can be placed in a .htaccess file: <IfModule mod_headers.c> ## # Add a Vary Accept-Encoding header for the compressed resources. If you # modify the file types above, make sure to change them here accordingly. ## Header unset ETag # Header set […]

Cleanup Ubuntu

In the last time I had the problem, that my system became very slow and wasn’t usable anymore. Here are the steps I’ve taken to get rid of this problem: Cleanup old packages in the terminal: $> sudo synaptic got to  Settings -> Preferences -> Files activate the bullet point Delete downloaded files after installation under Temporary […]

Performance optimized attribute saving

Sometimes, when you have to handle many data-sets, it is more efficient to save only those attributes that have changed: // load product $product = Mage::getModel(“catalog/product”)->load(142);   // change attribute $product->setTitle(“Test”);   // tell resource attribute to save only the specified field $product->getResource()->saveAttribute($product, “title”);