django-oscar icon indicating copy to clipboard operation
django-oscar copied to clipboard

Basket middleware takes a long time

Open FloridSleeves opened this issue 5 years ago • 1 comments

Issue Summary

We profile oscar's home page loading with a profiling tool PyLive. And we find in src/oscar/apps/basket/middleware.py, BasketMiddleware.call unexpectedly takes a long time, summing up to over 90% of the total time. And things are the same for product page and even search result page.

So we wonder if there is anything slow down in this basket middleware.

Steps to Reproduce

  1. Profile functions in oscar
  2. Load the main page and get the profiling result, you will see BasketMiddleware.call takes up a lot of percentage.

Technical details

  • Python version: 3.6.9
  • Django version: 2.2.12
  • Oscar version: 2.0

FloridSleeves avatar May 22 '20 07:05 FloridSleeves

Likely duplicate of #1329

solarissmoke avatar May 22 '20 07:05 solarissmoke