Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Production App Slow

Status
Not open for further replies.

SummersBren

Programmer
Apr 6, 2011
5
US
I have written an ASP.Net (VS 2008) program. When running in visual studio or pointing to the development server (in IE8) or remoting in to the production server and running in IE8 ,the application runs fine. But when accessing from client computer pointing to production server it's extremely slow. I've tried numerous things: debug= "false", disabled viewstate but my dropdowns and grids don't populate, etc. I'm at a loss because it runs fine in other situations so that would tell me it's not a database or application issue. Any answers?

 
Sounds like a networking issue. I would talk to the network admins there.
 
We have other apps on this server written in the same version of visual studio that work fine.
 
how much data is in production?

typically development and testing use smaller sets of data, than what is contained in production. If you don't limit the size of the result set you could easily end up with queries returning 1000's of rows which will kill preformance.

something else to consider is the number of remote calls from the code to the database. locating and eliminating [tt]select n+1[/tt] problems will also improve preformance.

after analyzing this aspect I would also see how large the html page size is. Webforms ViewState can also be a significant factor in poor performance.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
There are several datagrids on the main page, but what I don't understand is that it works fine in development and if we remote in to the production server.

We are getting the following error in the log file when the main page is opened or refreshed:
Viewstate verification failed. Viewstate was invalid.
But we don't see an error in the application.

I tried to disable view state in several areas, page, controls, etc. but then my dropdowns and grids do not populate.

Why would it work well in other situations but just not on the production server after being published?
 
it works fine in development and if we remote in to the production server
Are you saying you are using a RDC session and running the app on the production server directly?
 
It is running fast because you are running it directly on the server. You have no/minimal network traffic to contend with. Running against the production server from the server itself, and from a client PC is 2 different things. I go back to my orginal statment of, "get the network admins involved
 
But why would it run fast from the client computer pointed to the development server? And other applications on the production server run just fine. This is so frustrating. I need to get this app into production.
Could it have something to do with multiple datagrids on the main page?
 
first you need to quantify what the problem is.

there are 3 things you can profile
1. sql statements
2. http traffic/network latency
3. the code base

you can use sql profiler on MS Sql Server. If you use an ORM like Nhibernate, EF or Linq2Sql you can use nhprof, efprof or lsprof from Hibernating Rhinos to monitor the generated sql as well.

use or fiddler (ie) or firebug (firefox) to monitor the http traffic.

code profilers like Ants Profiler and JetBrain's dotTrace allow you to profile the code and locate bottlenecks.

Once you know where the problem is you can fix it.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top