Link to home
Start Free TrialLog in
Avatar of evo_x
evo_xFlag for Romania

asked on

why is my ASP.NET 4 site slow?

I have a core 2 duo T7400 with 4GB RAM, windows 2003 server with sql server 2005 and the site is running in ASP.NET 4
The CPU is only at 10%, but the site is very unresponsive, the database have indexes on all queried fields.
When I had under 1000 records the response was almost instant, now with 60k records some queries takes forever.

What can I do to improve the performance of the site?

the site is http://www.mobivel.com
Avatar of Dale Burrell
Dale Burrell
Flag of New Zealand image

For each database call trace the start and end times so you can see where the time is being taken. Then assuming it is a query use the query optimiser to sort it.
Avatar of evo_x

ASKER

What is strange that sometimes the same query returns in 2-3 seconds and after an hour it takes more than 30 seconds and I get a timeout.
The site does not have heavy traffic, 50-100 visits / day.

How do you mean to trace? from sql server or from the web app ?
which queries are slow?
we can focus on slowest page/query...
is the site compiled on web server? or you have just code and each time server builds it?
ASKER CERTIFIED SOLUTION
Avatar of Dale Burrell
Dale Burrell
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of evo_x

ASKER

HainKurt, the website is compiled in visual studio each time and then uploaded to server. It is slow expecially whn you click on a category which has many records, ex. Honda, but it's not slow always, sometimes it's fast and sometimes it takes forever to return.

dale burrell: I will try that trace.
UnexplainedWays: I think the viewstate might be a cause...I will check that out.

Thanks all ! I will do some checks and come back.
when you run that query against db from ssms, is it always fast or sometimes slow?
Avatar of evo_x

ASKER

in ssms it's fast always.
Avatar of evo_x

ASKER

dale_burrell: How can I activate the trace? because the trace.axd file is not created.
trace.axd isn't a real file... its intercepted by the asp.net handler. Anyway for the full story check this out http://msdn.microsoft.com/en-us/library/bb386420.aspx