Solved

Speeding up Web Apps

Posted on 2006-06-21
11
519 Views
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
0
Comment
Question by:NAORC
[X]
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
11 Comments
 
LVL 5

Author Comment

by:NAORC
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..
0
 
LVL 7

Expert Comment

by:mmarksbury
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.
0
 
LVL 3

Expert Comment

by:zawedikian
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

0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 5

Accepted Solution

by:
lostcarpark earned 500 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:

http://www.codeproject.com/aspnet/ServerViewState.asp

Hope this is helpful to you.

James
0
 
LVL 5

Author Comment

by:NAORC
ID: 16952709
dDwxMjMxMjQ2NTI2O3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDI+O2k8ND47aTw2PjtpPDc+O2k8OD47aTw5PjtpPDEwPjtpPDEyPjtpPDE1PjtpPDE3PjtpPDE4PjtpPDE5PjtpPDIzPjs+O2w8dDxwPHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Oz47bDxpPDU+O2k8Nz47aTw5Pjs+O2w8dDxwPHA8bDxCb3JkZXJTdHlsZTtfIVNCOz47bDxTeXN0ZW0uV2ViLlVJLldlYkNvbnRyb2xzLkJvcmRlclN0eWxlLCBTeXN0ZW0uV2ViLCBWZXJzaW9uPTEuMC41MDAwLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49YjAzZjVmN2YxMWQ1MGEzYTxPdXRzZXQ+O2k8NjQ+Oz4+Oz47Oz47dDxwPHA8bDxCb3JkZXJTdHlsZTtfIVNCOz47bDw1MDxPdXRzZXQ+O2k8NjQ+Oz4+Oz47Oz47dDxwPHA8bDxCb3JkZXJTdHlsZTtfIVNCOz47bDw1MDxPdXRzZXQ+O2k8NjQ+Oz4+Oz47Oz47Pj47dDxwPHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Oz47Oz47dDxwPHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Oz47bDxpPDE+O2k8Mz47PjtsPHQ8cDxwPGw8SW1hZ2VVcmw7PjtsPGh0dHA6Ly9vcmMtc3FsMi8vUkRWL0J1dHRvbl9pbWFnZXMvUHJpem0yX2Rpcy5ibXA7Pj47Pjs7Pjt0PHA8cDxsPEltYWdlVXJsOz47bDxodHRwOi8vb3JjLXNxbDIvL1JE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uX2ltYWdlcy9DbHJBbGxTZWxlY3Rpb25zX2Rpcy5ibXA7bzxmPjs+Pjs+Ozs+Oz4+O3Q8cDxwPGw8VmlzaWJsZTs+O2w8bzxmPjs+Pjs+Ozs+O3Q8cDxwPGw8VmlzaWJsZTs+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
 
LVL 7

Expert Comment

by:mmarksbury
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.  
0
 
LVL 7

Expert Comment

by:mmarksbury
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.
0
 
LVL 4

Expert Comment

by:recklez
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.
0
 
LVL 5

Expert Comment

by:lostcarpark
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.
0
 
LVL 5

Author Comment

by:NAORC
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.
0
 
LVL 5

Author Comment

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

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

705 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