开发者

slow category import in magento

开发者 https://www.devze.com 2023-01-09 03:22 出处:网络
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 us

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 开发者_Python百科category but it also doesn't help.

Any idea how to speed things up?


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


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


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


Simply turn the index mode to manual. After import is done turn mode to auto. This will increase your speed in 5+x times.

It should be turned off, because the magento makes reindex after every save if index mode is auto.

0

精彩评论

暂无评论...
验证码 换一张
取 消