views:

88

answers:

6

Hello Friends,

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.

A: 

Hey,

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.

Brian
Thanks Brian, but i don't use any of javascript files
Jordon
+1  A: 

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
marapet
Thank you so much for list.If you have carefully noticed Go4Sharepoint.com than, I have only one style.css and no javascript, I have also implement GZip (deflate), Is there anything more running which can be helpful?
Jordon
Yes I did take a quick look at your site, and I didn't see any obvious points (many css and js files, etc), that's why I went for server side improvements. In my experience, caching improves response times tremendously.
marapet
A: 

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)

tster
If you have read than can you suggest me anything I should implement?
Jordon
@Jordon, I added some ideas.
tster
A: 

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

Abe Miessler
Yeah you are right, I haven't given much attention to DB scripts running, I would definately try, Thanks
Jordon
A: 

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?
StingyJack
I can't change browser, neither i can change network of clients PC, I can certainly change server, but that I believe right now have no problem!
Jordon
You are missing the point... you are saying "It's slow", but have not identified where "It" lives, or what "It" is. This kind of hack and stab approach may find its target eventually, but wastes the most time. Step back, and take measurements with the tools available to see where the problem exists before just picking solutions.
StingyJack
+2  A: 

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.

Aristos
I hope that this is not an advertize of your pages :/
Aristos
Thanks Aristos, FYI: my website is in asp.net and their is no page called banner.php. You found that GZip is not working, could you please tell me on what basis you are telling that?
Jordon
@Jordon as I say the gzip is not the problem because your pages are small - how ever gzip them.
Aristos
I see banner.php in chrome's dev tools. It originates from sharepointads.com and it dominates your page load time.
BioBuckyBall
@Jordon, banner.php is infact dominating your page load time. You need to stop it from modifying your page layout which will make your page **feel** a lot faster (which is the only thing which is important.
tster
Thanks your reply was very helpful, I would try to fix listed problem.
Jordon