0

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. :(

Brandi
  • 1,549
  • 4
  • 24
  • 32
  • BTW, it's "ASP.NET", not "ASP .NET". – John Saunders Jun 01 '10 at 19:28
  • What is the nature of the requests? Do they have an __EVENTTARGET set? Also you might find fiddler to be easier to use to monitor traffic than collapsing and expanding the panels in firebug! http://www.fiddler2.com/Fiddler2/version.asp – Martin Smith Jun 01 '10 at 19:39
  • Thank you for leading me to this... __EVENTTARGET is set to a timer. This should do an update to tell the user what progress has been made. Any way that maybe on production this timer's interval is being ignored? – Brandi Jun 01 '10 at 19:53
  • 1
    If you are getting loads of timer requests I guess either the timer interval must be very short (how are you setting this?) or there must be multiple instances on the page (You're not inadvertently creating a new timer inside each row in the gridview?) – Martin Smith Jun 01 '10 at 20:37
  • I set the timer to a larger interval - 1 second. It showed me that the timer was working, but that for some reason, the local app was processing ~50000 records/sec and that the production app was processing at best ~5000. – Brandi Jun 01 '10 at 20:47
  • Hi, which version of IIS is running in production? – LesterDove Jun 02 '10 at 01:03

4 Answers4

0

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
  • 19,439
  • 4
  • 63
  • 103
  • 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 Jun 01 '10 at 19:35
0

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
  • 2,849
  • 20
  • 31
  • I don't see anything failing in either the local or the production app. I am using the dev server. – Brandi Jun 01 '10 at 21:43
  • Try switching it to use IIS out of VS2008. Then run it out of dev and see if it runs any different. – Flory Jun 01 '10 at 21:44
  • 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 Jun 02 '10 at 21:32
0

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.)

Community
  • 1
  • 1
LesterDove
  • 3,014
  • 1
  • 23
  • 24
  • 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 Jun 02 '10 at 21:34
0

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

ASP.NET Website Slow Performance on production server

Thanks to everyone who helped answer.

Community
  • 1
  • 1
Brandi
  • 1,549
  • 4
  • 24
  • 32