Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 535
  • Last Modified:

Speeding up Web Apps

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
0
NAORC
Asked:
NAORC
  • 4
  • 3
  • 2
  • +2
1 Solution
 
NAORCAuthor Commented:
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..
0
 
mmarksburyCommented:
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.
0
 
zawedikianCommented:
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

0
Independent Software Vendors: 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!

 
lostcarparkCommented:
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:

http://www.codeproject.com/aspnet/Serv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w8VmlzaWJsZTs+O2w8bzxmPjs+Pjs+O2w8aTwxPjs+O2w8dDxwPHA8bDxWaXNpYmxlO1RleHQ7PjtsPG88Zj47XDxCXD5JbmZvIGJveDpcPC9CXD4gTWVzc2FnZXMsIHByb21wdHMgYW5kIEluZm9ybWF0aW9uIFRvb2wgcmVzdWx0cyBhcHBlYXIgaGVyZS47Pj47Pjs7Pjs+Pjt0PHA8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47PjtsPGk8MT47PjtsPHQ8cDxwPGw8VmlzaWJsZTs+O2w8bzxmPjs+Pjs+Ozs+Oz4+O3Q8cDxwPGw8VmlzaWJsZTs+O2w8bzxmPjs+Pjs+Ozs+O3Q8cDxwPGw8VmlzaWJsZTs+O2w8bzxmPjs+Pjs+Ozs+O3Q8QDA8Ozs7Ozs7Ozs7Oz47Oz47Pj47Pj47Pgp1b/2nW8rK5g4y3PsrDecI45P3


Yeah, i think thats quite a bit....
0
 
mmarksburyCommented:
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.  
0
 
mmarksburyCommented:
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.
0
 
recklezCommented:
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.
0
 
lostcarparkCommented:
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.
0
 
NAORCAuthor Commented:
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.
0
 
NAORCAuthor Commented:
Sorry guys, please bear with us... we've hit some dificulties.
0

Featured Post

Independent Software Vendors: 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!

  • 4
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now