djangodjango-dev-server

Very slow first request in Django Development server


Whenever I run python manage.py runserver and accesses my website with localhost:8000 in the browser, the first request is VERY slow (around 10 seconds).

Following requests are really fast. Is there any way to improve the performance of this? It's very unconvenient because while in development, it's always reloading due to updates to the code.

Thanks a lot.


Solution

  • Found it, Middleware that sends data to a remote monitoring service. Solution was to activate it only on production server and not in dev!