Oscar Django many categories slow down the site

65 views
Skip to first unread message

Solorak Sweet

unread,
Aug 3, 2022, 10:25:36 AM8/3/22
to django-oscar
I've created a site ( Clothing Shop ) which has 426 categories . The site is really slow due to having many categories . ( Even when creating a child category it is saved in Category at the database as seen from shell (oscar category creation)) . I've tried many methods to optimize the queries that are made when a page is loading but still too slow . I've followed the django doc for optimized categories (https://docs.djangoproject.com/en/4.0/topics/db/optimization/) . I've also tried to cache some queries . Moreover the fact that I think the slowness comes from categories is because I've seen that the category queries take the most time through django toolbar .Any help would be great ! .

Joey Jurjens

unread,
Aug 15, 2022, 4:44:53 PM8/15/22
to django-oscar
Hello,

Excuse the late reply, I just got back from my vacation :).

It's quite hard to exactly figure out why it's so slow on your site without code. However, are you rendering all those categories in a navbar/mega menu maybe? And if yes, how are you doing this?

You could always cache those mega menu's to prevent slow websites with the built in django cache templatetag.

Let me know!

Joey


Op woensdag 3 augustus 2022 om 16:25:36 UTC+2 schreef solor...@gmail.com:
Reply all
Reply to author
Forward
0 new messages