Now that my blood sugar and cholesterol levels are somewhat back to normal after the Xmas feeding madness, I wanted to have a quick look at the new features Magento’s latest release brings to the world of eCommerce. Especially after my colleague Tobias Vogt twittered something very positive about the speed of the new import functionality, I just had to have a look myself.
It is true. Magento’s 1.5 version comes with a new core module called ImportExport that is fast. Amazingly fast. I have only tested is with simple products and a standard set of attributes so far, but I was able to import 1,000 products in under 4 seconds (!) on my Macbook Pro. I’m not sure whether other product types, more attributes etc. will drastically decrease performance or whether this type of import causes problems in other areas – this will have to be tested in more detail – but for now all I can say is: hats off to the core developers!
In order to test the import, the first thing I tried was to use a Dataflow import file which contained a decent amount of test products. Unfortunately, the new import format isn’t compatible to the old Dataflow format, so the module only threw errors. Thus, the next step was to manually insert a test product into my fresh install of 1.5-alpha and use the new export functionality to generate a CSV file that I could use as a template for a new import file.
Once the import file was prepared, I was given the choice of wanting either to append, replace or delete existing data – in my case products. I opted for Append Complex Data, hit the Check data button, got a validation in about 2 seconds, hit the import button and was very impressed about 4 seconds later: all products where there in the product management as well as in the respective database tables, very neat! I did the same a second time using the Delete Entities option, and within seconds all these products were deleted again. Those of you who know how painful it can be to get rid of products once they are in the Magento database will really appreciate this I’m sure.
The question now is: How on earth can this thing be do darn fast? The answer: Magento uses less Magento to get the job done. Rather than using the model-structure (in this case, mainly product_catalog), the new ImportExport module uses direct database access via Varien_Db_Adapter_Pdo_Mysql. This class is an extension of the respective class of the Zend Framework, ie. the “magic” happens deeper in the overall system. Of course this approach harbours considerable risks: If there’ s an error in this logic, an import could destroy the store database. But I’m sure Magento is very aware of this and will allow enough time for testing.
I’m happy that Magento addresses one of the most urgent problems in this manner, and if the importer works well in other scenarios yet to be tested, the last Magento release ends this year on a quite positive note.
Update: At the Imagine eCommerce conference my buddy Vinai Kopp has given a talk on the Magento 1.5 import.
Dr. Roman Zenner ist schon seit 2001 im E-Commerce aktiv. Er hat führende Fachbücher zu bekannten Shopsystemen verfasst, publiziert regelmäßig in Fachmagazinen zu E-Commerce-Technologie und arbeitet seit Januar 2020 als Technical Partner Manager bei Shopify.