Showing posts with label websiteoptimization. Show all posts
Showing posts with label websiteoptimization. Show all posts

YSlow for analyzing your web site


In the Problem with WebSphere Portal performance entry i talked about how browser is spending most of the time in getting HTML from portal but major portion of time is spent in downloading and executing other resources.

So i started thinking about what i can do to make the portal site browser friendly (So that my pages render fast). It seems that Google and Yahoo has done lot of research on how to improve web site performance.

Yahoo has created a YSlow tool that we can use to analyze the performance of web page, they have following set of rules that they apply to web page to figure out if its browser friendly and based of the rules it gives us suggestion on what can be done to improve performance of the page


  1. Minimize HTTP Requests

  2. Use a Content Delivery Network

  3. Add an Expires or a Cache-Control Header

  4. Gzip Components

  5. Put StyleSheets at the Top

  6. Put Scripts at the Bottom

  7. Avoid CSS Expressions

  8. Make JavaScript and CSS External

  9. Reduce DNS Lookups

  10. Minify JavaScript and CSS

  11. Avoid Redirects

  12. Remove Duplicate Scripts

  13. Configure ETags

  14. Make AJAX Cacheable

  15. Use GET for AJAX Requests

  16. Reduce the Number of DOM Elements

  17. No 404s

  18. Reduce Cookie Size

  19. Use Cookie-Free Domains for Components

  20. Avoid Filters

  21. Do Not Scale Images in HTML

  22. Make favicon.ico Small and Cacheable



When i did YSlow analysis of the portal page with default IBM theme and no portlets i got quite a few suggestions on what i can do to improve performance. I am planning to make these changes and see how it helps.

Problem with WebSphere Portal performance

Recently i was trying to find out why my portal pages are slow, so i used firebug to see where my browser is spending most of the time and it turned out that less than 30% of time is spent inside portal engine, for generating HTML markup of the page and major chunk of time is spent in downloading and executing resources such as images, css, JavaScript.



As you can see it took 2.14 seconds for browser to download and render page but out of that only 267 milliseconds are spent in getting the HTML for the page inside portal and rest of the time is spent in downloading and executing other 12 resources.