Performance: Development server and runserver
This affects the development environment's responsiveness and reload speed, impacting how quickly developers see changes reflected in the browser.
python manage.py runserver
python manage.py runserver --noreload
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Django runserver with autoreload | N/A | N/A | N/A | [OK] Good for development speed |
| Django runserver without autoreload | N/A | N/A | N/A | [!] OK but slows developer feedback |
| Django runserver in production | N/A | N/A | N/A | [X] Bad for user performance and scalability |
| Production WSGI server (Gunicorn/uWSGI) | N/A | N/A | N/A | [OK] Good for production performance |
runserver command do?runserverrunserver command is used to start a lightweight web server on your local machine.runserver is NOTpython manage.py runserver <port>, so python manage.py runserver 8080 is valid.python manage.py runserver 0.0.0.0:8000?python manage.py runserver 9000 but get an error saying the port is already in use. What should you do?python manage.py runserver <new_port>.python manage.py runserver 0.0.0.0:8000 makes the server listen on all interfaces, allowing your phone on the same Wi-Fi to connect.--external, so it will cause an error.Pass the test and this pattern moves unknown