I generally do my development on a dedicated development server running Linux with a fairly good amount of RAM (2GB) and a fast processor (the server does a lot more than just server django :)). Even when I am out of office I SSH to the development server. A few weeks ago I was on a trip where I wasn’t going to have good internet access for a lot of time. So, I decided to setup django on my tablet (Windows) to work locally. Everything was great until I had to access the site.
http://localhost:8000
waiting…
waiting…
Finally, after a few seconds the main page showed up. Then I clicked on a link.
waiting…
waiting…
Once again the page showed up after a few seconds. I was surprised how slow this was behaving. I booted to Linux and there it was very snappy. Unsatisfied with this performance issue, I did some searching and debugging and finally found out that the 'localhost’ is what was causing the problem. As soon as I switched to the local IP address (127.0.0.1), the server came back to life!
If you are developing on Windows and the server seems to be a little slow then make sure to use ’127.0.0.1:8000’ instead of 'localhost:8000’. If you are curious about the cause then search on google for complete explanation. Apparently this has to do with IPv6 and might a be non-IE issue.
Comments
The built-in django server (runserver) by it self should be able to serve the dynamic stuff with an acceptable response time. In my experience the media has generally been the culprit. Have you tried accessing your app in a browser with images disabled? What browser are you using? I think the next step should be to browse the site in Firefox with the YSlow extension enabled, that will probably give you a good idea of where the issue lies. Let me know if you need any help with that.
Good luck,
Farhan