Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Speeding up Web Apps

Posted on 2006-06-21
Medium Priority
Last Modified: 2008-03-03
Hi Guys,

I have a c# .net web application using IIS6, SQL2005, MapXtreme and ASP.net (ASP front end).

It is running extremely slow.  I have optimised my code as much as possible, I have put IIS on the same machine as SQL Server and i have installed extra network cards into the Web server / SQL server and created a MAC Bridge.

I can't give too many details on the application as it is a work project and there are confidentiality issues.  Does anyone know or have any suggestions as to what i can do in order to try and find out:

A) why it is running so slow

B) what i can do to speed it up.

Bearing in mind i cannot give out much more detail than this, I am making it worth 500 points for whoever can give advice, suggestions, hints or tips in order for me to speed the thing up
Question by:NAORC
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +2

Author Comment

ID: 16951388
Dont know whether or not it makes a difference, but a select few machines have fast responce times and the app works fine, but on most its real slow.  I have looked at too many settings to name and had no joy..

Expert Comment

ID: 16951819
A sure fire way to speed up an ASP app that is sluggish is to implement page caching.  This feature of asp.net is very helpful and very customizable.

Good luck.

Expert Comment

ID: 16952145
i think reading large nb of data from databases slowes a lot ur application. u can apply Maintenance Plan to ur db. it might help.
also try to optimize ur queries.
also try to use as much as u can client side scripts as vbscripts, javascripts to minimize going to the server.

that s the most i can tell u since  i dont know execlty what ur app do.

good luck

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Accepted Solution

lostcarpark earned 1500 total points
ID: 16952528
Hmmm, this sounds familiar. Do you have a lot of viewstate information in your app? You can find out by using the "View Source" command in your browser. There will be a block of binary data near the top of your page source. If there is more than a couple of lines of data, it can seriously affect performance, particularly on slower networks.

I have an app with a lot of UserControls that are hidden when not required, and I ran into a very similar problem. The solution I found was to move the viewstate from the client to the server and store it in the Session. This can be achieved quite neatly by changing the base class of your pages to one that inherits from the standard one, but replaces the methods that save and retrieve the viewstate with ones that sasve to the Session.

You can find more about this here:


Hope this is helpful to you.


Author Comment

ID: 16952709

Yeah, i think thats quite a bit....

Expert Comment

ID: 16952763
It is quite large but not abnormally large.

I'd give some other things a try before implementing a custom view state for your app.  

Expert Comment

ID: 16952773
A good way to test would be perform some similar logic on a code behind without adding any controls on your ASPX page.  This will keep the View State small and also allow you to run your logic and do a latency test.

Expert Comment

ID: 16954610
In my opinion your viewstate is tiny. That is definitely not the issue.

First you need to find out where the app is running slow. Is it the code? Are your SQL queries slowing down the website?

Create a couple of static html pages and see how fast they load.

Also you could use SQL Server profiler to monitor the activity between your app and the database server. See if any queries are taking too long to execute.

Use stored procedures if you are not already doing so.

Create some indexes to optimize your queries.

In the web.config file disable debug.

Make sure your select queries return only the columns your are actually using.

How is you CPU usage when the app is running.
Is it nearly 100% and if yes check to see which processes are using that much cpu and also check your memory usage.

Check the memory usage when the app is running.

Do some timing on you code blocks and see how fast they execute.

I hope this helps.

Expert Comment

ID: 16956173
I agree that ViewState is not excessive (I wouldn't go so far as to say "tiny", but I've seen ones that run to several hundred K), so something else must be the issue. You mentioned that it runs okay on higher spec PCs, but the problem mainly occurs on older, slower machines. This would suggest that the problem is at least partly on the client side. Are you using any 3rd party controls that have a large JavaScript element? This would be relying quite heavily on the client PC and contributing to the problem.

Author Comment

ID: 16958823
All answers appreciated.  We are working on implimenting some answers now.  if and when one works, point will be awarded.  thanks in advance for patience experts, but this is a lot of code we need to work on.

Author Comment

ID: 17008752
Sorry guys, please bear with us... we've hit some dificulties.

Featured Post

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question