views:

66

answers:

3

Hi

I wrote a custom adapter for importing 6K categories using the advanced profiles. The import is too slow. I've tried increasing the number of records from 1 to 5 but it doesn't help. I also tried using ->setDisplayMode($dispMode) and ->setIsMassupdate(true) before saving the category but it also doesn't help.

Any idea how to speed things up?

A: 

I think there is no magic solution. Maybe try activating the cache and refresh it once your import is finished.

vrnet
A: 

Magento importing mechanism is painfully slow. You would be better off inserting the data directly into the database.

silvo
A: 

In order to avoid out-of-memory issues, all of Magento's import profiles run on separate requests. This means that the entire framework is spun up to serve each chunk of the import. This, of course, becomes the majority of the request.

To alleviate this, do any of the things that speed up a Magento installation otherwise. An opcode cache like Xcache would be a big help here. Make sure all your caching is turned on as well.

I've tried to use the Magento models to do larger imports in the past, but the framework leaks memory and saving is slow (Magento generates too many other queries on the side). If you really need performance for imports, you'll need to write the them to the yourself. Just be aware that your code is likely to be break w/ version upgrades.

Hope that helps!

Thanks, Joe

Joseph Mastey