Table of Contents

IT:AD:IIS:Performance


## Load Testing ##

http://nirajrules.wordpress.com/2009/09/17/measuring-performance-response-vs-latency-vs-throughput-vs-load-vs-scalability-vs-stress-vs-robustness/

http://www.codeproject.com/Articles/418811/Know-your-application-better-with-visual-studio-20

Tools

Install YSlow plugin for Chrome Developers

[Yahoo Web Performance Best Practices and Rules](http://developer.yahoo.com/yslow/)

  1. Minimize HTTP Requests * Combine files. Combine JScript. CSS Sprites.
  2. Add an Expires or a Cache-Control Header * For static content set in 10 years in future, and add Version No to filename… * For dynamic content, use Cache-Control
  3. Gzip Components * Supported by 90% of current browsers, reduces payload by 70%…
  4. Put StyleSheets at the Top * Allows progressive rendering, rather than blank, while waiting for more info, in order to not have to repaint screen.
  5. Put Scripts at the Bottom * Scripts block parrallel loading - even across domains - so no images, or anything can come in till finished.
  6. Avoid CSS Expressions * Depracated in IE8. Was too CPU Intensive.
  7. Make JavaScript and CSS External * Externalized as files (rather than Inline) means cacheable…
  8. Reduce DNS Lookups * Cache is cleared at most every hour. Has to relook up. Between 2 (due to externalized static resources) but not more than 4…
  9. Avoid Redirects * Put a trailing slash!
  10. Remove Duplicate Scripts * Obvious…but it happens in 20% of sites.
  11. Configure ETags * Configure them for webfarms
  12. [Flush the Buffer Early] * Right after Head, so that it can go get css, etc. while wating for server to build rest of page.
  13. Use GET for AJAX Requests * POST is a two step process.
  14. Post Load Components * Load non-visible images later (see YUI Image Loader, and YUI Get utitity)
  15. Post Load Components * For future pages…
  16. Reduce Cookie Size * They are sent out with every request (images, css, etc.)
  17. Use Cookie-Free Domains for Components * A solution to the last issue…
  18. Make favicon.ico Small and Cacheable * Can cause 404's, will send cookies, is downloaded first…
  19. Make things small: * iPhone won't cache things larger than 25K

Server Execution Best Practices

Optimizing Network Transfer Best Practices

* Use Content Distribution Networks

* Use compression

* Minify Javascript and CSS

* Use Doloto for splitting the initial Javascript payload

* Do not scale images in HTML

* Optimize Images

* ASP.NET: Disable ViewState

* Use the Cache-Control header to help the browser cache

* Review Cookies and their sizes

* ASP.NET: Keep Master Pages lean

* Careful with ETags on IIS 6.0

* Use lowercase to reference your resources

* Another issue: resources compress better if lowercase is used. Why? Because most letters are lowercase. Using a smaller set of characters will produce more dictionary matches and compression is more effective. I read this is in “Ultra-Fast ASP.NET”. Need to try this though!

#### References #### * http://bit.ly/wQCdr7 * 12titans.net * Ultra-Fast-ASP-NET