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.