Magento – Slow category page load time after programmatically adding products

categoryimport

Would there be any reason why a category page would take a considerably longer amount of time to load after adding products to the website via PHP? This is after reindexing and clearing cache, etc.

Example, after importing 43 config products and 800 simple products to an empty category, page load for that category becomes 12-15 seconds. I have other categories with many times that amount of products (that were added manually) that take only 2-3 seconds to load their pages.

Product pages for these newly imported products load just fine. All attributes show up fine.

Switching to default theme, just to make sure it was nothing on the frontend, doesn't make a difference.

No PHP errors show up in server's log at all, unless I tell it to load a lot of products on one page (100+) then I hit memory errors.

Here is a pastebin of the import code, not sure if it will help. It's looping through one CSV with the configurable product info, then a second CSV with pricing info for each simple product http://pastebin.com/WA7fuJQd

Best Answer

Simply because complex products must process more so are naturally multiple times slower. Likely your other categories only have simple products, normally this comes back to inadequate hosting.

Related Topic