Satchmo is too slow when many items are being processed

Issue #1241 new
sjuxax created an issue

Satchmo is really slow on the atom feed when we have a reasonable amount of products (8000 in my case). The default templates are also much slower because I also have approx. 200 categories, and the database is often hit asking for translations. OptionGroups are retrieved on category display pages and I don't see why that would be, but that also slows things down.

The atom feed demonstrates the most egregious issues here. Even if I modify the view to return with select_related(), Satchmo still talks to the database 3-5 times per iteration, which probably adds 500ms per item alone.

I've attempted to implement caching on categories etc. using django-keyedcache, but the API is not very clear and no one is around on IRC. The mailing list has also been relatively silent on this so I'm seeing if I can get more attention or help here.

I should be able to query the database once and get all the information that I will need for an operation. For instance, instead of performing one query per category for each category on the category list, we should perform only one query that retrieves the correct categories and all needed information. This would greatly speed up many operations, as would adding caching in some new places.

I understand this may be hard using Django's ORM. I find that to be a major bummer. Maybe we can implement an alternative SQLAlchemy backend or something? I've found that to be rather faster and more pliable than Django's ORM.

Comments (0)

  1. Log in to comment