views:

87

answers:

4

I have an ASP.NET application that does a large database read. It loads up a gridview inside an update panel. In VS2008, just running on my local machine, it runs fantastically. In production (identical code, just published and put on one of our network servers), it runs slow as dirt.

Debug is set to false, so this is not the cause of the slow down. I'm not an experienced web developer, so besides that, feel free to suggest the obvious.

I have been using Firebug to determine what's going on, and here is what that has turned up:

On production, there are around 500 requests. The timeline bar is very short. The size column varies from run to run, but is always the same for the duration of the run.

Locally, there are about 30 requests. The timeline bar takes up the entire space.

Can anyone shed some light on why this is happening and what I can do to fix it? Also, I can't find much of anything on the web about this, so any references are helpful too.

EDIT: I forgot to mention that I am using the exact same database for both local and production environments.

EDIT: __EVENTTARGET points to the timer that updates the progress.

EDIT: Timer appears to be working - I set it to a larger interval, which shows me that the local app is processing ~50000 records/second and that the production app (same database, same code!) is processing at best ~5000 records/sec.

Back to square one, mysteriously slow app. :(

A: 

My guess would be the size of the database you're using on your dev box vs. production. Is it possible there is something happening for each row of your gridview that only happens 30 times on your box becuase it has less data than production?

Systematic debugging - strip it down and add things back one at a time until you see the change.

n8wrl
Unfortunately it's the exact same database. I have tried systematic debugging to no effect so far - originally thought it was my update panels or ajax modal popup extender, but even removing them, still slow.
Brandi
A: 

Brandi,

Can you check the Event Viewer logs for the web server? Do you have anything failing in there?

Are you running the app in VS2008 off of IIS or the dev server?

Flory
I don't see anything failing in either the local or the production app. I am using the dev server.
Brandi
Try switching it to use IIS out of VS2008. Then run it out of dev and see if it runs any different.
Flory
I tried to do this but am having an issue: "Cannot read configuration file due to insufficient permissions". I don't think I can grant anyone permissions, but I don't really understand why this issue has come up.
Brandi
A: 

Anytime I've experienced strange discrepancies between seemingly identical dev and prod code, I've learned to have a quick look at the machine.config file in production.

If you have access to it, you might compare it to your local copy, and specifically review these settings (although the linked post doesn't refer to your exact problem per se.)

LesterDove
I have found my local copy, I could change that one, but I don't have access to the one on the server. Plus there are many other pages up on that server, not just mine. I'm thinking maybe I put it up on a different server and see if it still has those issues.
Brandi
A: 

I've come to accept that this may be a processor issue based on this other post:

http://stackoverflow.com/questions/1340218/asp-net-website-slow-performance-on-production-server

Thanks to everyone who helped answer.

Brandi