开发者

Asp.net Website Performance Improvement Checklist [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

I have asp.net website name http://www.go4sharepoint.com

I have tried almost all ways to improve performance of this site, I have even check firebug and page speed addon on Firefox, but somehow i am not pleased with the result.

I also tried like removing whitespace, remove viewstate, optimizing code which renders it, applied GZip, I have also no heavy session variables used, but still when i compare with other popular websites it is not upto the mark.

I have check CodeProject website and was surprise that even though they have lot of stuff displayed there website is loading fast and开发者_运维百科 they also have good loading rate.

To all experts, Please suggest me where i am going wrong in my development.

Thank you.


First of all I see now your pages and they not gZipped. You make the question for the gzip, but its seems that at the end they are not gzipped.

Second your pages come very fast, they are small, and the lag time is slow, that means that your call to sql is good.

I only see a problem on "banner.php" page that for some reason this is seams that make the delay. A Javascript make this call to banner.php and waits until get return, render it and continue.

Check this 2 issues to fix your slow load.

About the banner.php

Here is one of the calls that you page make http://sharepointads.com/members/scripts/banner.php?a_aid=go4sharepoint&a_bid=ac43d413 and you make at least 9 of them !. in first page.

This page have 400ms lag x 10, plus delay to load and reder is the delay that you search for. and is not comming direct from you. You need to find some other way to load them...

I can suggest some other way but not I must go... maybe tomorrow

gzip

An external test to prove that your pages are not gzip. Just see the report.


When optimizing the html visible to the client, the server side is sometimes neglected. What about:

  • Server side Caching - from entire page to data caching
  • Reduce number of database queries executed. And once retrieved from the database, cache it.
  • Is your server hardware up to it? Memory, cpu?

EDIT:

And for completeness, here's the list from the performance section of the popular question What should a developer know before building a public web site?

  • Implement caching if necessary, understand and use HTTP caching properly
  • Optimize images - don't use a 20 KB image for a repeating background
  • Learn how to gzip/deflate content (deflate is better)
  • Combine/concatenate multiple stylesheets or multiple script files to reduce number of browser connections and improve gzip ability to compress duplications between files
  • Take a look at the Yahoo Exceptional Performance site, lots of great guidelines including improving front-end performance and their YSlow tool. Google page speed is another tool for performance profiling. Both require Firebug installed.
  • Use CSS Image Sprites for small related images like toolbars (see the "minimize http requests" point)
  • Busy web sites should consider splitting components across domains. Specifically...
  • Static content (ie, images, CSS, JavaScript, and generally content that doesn't need access to cookies) should go in a separate domain that does not use cookies, because all cookies for a domain and it's subdomains are sent with every request to the domain and its subdomains.
  • Minimize the total number of HTTP requests required for a browser to render the page.
  • Utilize Google Closure Compiler for JavaScript and other minification tools


Are you using JavaScript, and are these JavaScript files loaded at the very beginning? Sometimes that slows the page down... Minifying JS files helps reduce size, and if you can, load scripts dynamically after the page loads.

Using an approach like http://www.pageflakes.com can also help too, where the content is loaded after the fact.

Lastly, is it speed related to your machine or hosting? Doing a tracert in the command window can help identify the network traffic.

HTH.


Have you identified any slow running queries? You might consider running profiler against your DB and see if anything if running long...


Before you do anything to change the code, you need to figure out where the problem actually is.

Which component is it that is "slow"?

  • The browser?
  • The server?
  • The network?


A stackoverflow user actually has a good book on this subject:

http://www.amazon.com/gp/product/1430223839?ie=UTF8&tag=mfgn21-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1430223839

A couple of recommendations after looking at your site:

  1. Put some of your static files (images, js, etc.) on different domains so that they can be downloaded at the same time. (also turn off cookies for those domains)
  2. Use image sprites instead of separate images.
  3. Move around when things are loaded. It looks like the script files for the ads are holding up content. You should make content of the site load first by putting it in the HTML before the ads. Also, make sure that the height and width of things are specified such that the layout doesn't change as things are downloaded, this makes the site feel slow. Use Google Chrome's developer tools to look at the download order and timeline of all your object downloads.
  4. Most of the slowness looks like it's coming from downloading items from sharepointads.com. Perhaps fewer adds, or have them use space already reserved for them by specifying height and width.
  5. Add a far future expires time to the header for all static content.
  6. Serve scaled images. Currently the browser is resizing the images. You could save tons of bandwidth by serving the images already the proper size.

Also, download YSlow (from yahoo) and Page Speed (from google)


Another good post for performance.

Just check http://howto-improveknowledge.blogspot.com/2011/11/performance-improvement-tips.html

which explain the how to find bottleneck for performance.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜