The title pretty much sums it up, and I'm sure there's a perfectly valid explanation,
but it seems extremly odd that loading pages(after they're compiled) on my local computer seems to take forever, when the same code is blistering fast when "live".
I'm developing on Vista, IIS7, pretty ok hardware; while the server is a single machine, running Windows server 2003 and IIS6 on a Xeon <3 ghz and a gigabit line.
Of course, I understand that the web server is especially tailored for this kind of activity,
but it still seems strange that a machine serving up to 2-300 sessions at a time
(spread unevenly on ~5 .Net 2.0 applications) through a remote network(aka. the internet ;-)
is so much faster at presenting the pages, compared to running the code locally...
Just something that's been on my mind for a while...
UPDATE
Thanks a lot for the answers! Just thought I'd add a few points to the above:
Chose a random page from the project I'm currently working on, reloaded it completly a couple of times; locally I got it in about 4 seconds, compared to ~2 sec from the server. This was using FF and Firebug; using Opera I kind of felt there was a smaller difference but that's just my gut...
So I guess that leaves (as you mentioned) harddrives and the database connection... Just seems weird....
If you are using FireFox or Safari and you are on Windows Vista then you should disable IP version 6 since this messes with Vista in combination with WebDev and FireFox/Safari...
In FF type in about:config in the address bar, filter for "IPv6" and set enabled to FALSE!
This is a bug with IPv6 in Windows Vista and is a highly likely candidate for your troubles...
There are at least two reasons for this:
First, your local server is probably running the pages in debug mode with a debugger attached. This makes everything run slower
Second, each time you change your pages code or you restart your server all pages must be recompiled, and that takes some time.
On your production server the pages are compiled once and then the compiled version is served to all users, and you are probably not running in debug mode (I hope!).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With