Details my top 6 techniques for reducing page load speed on SP2010 internet sites, with a focus on page-level optimisation. Also covers techniques/tools for measuring page load speed, load testing etc.
3. Amazon: 100ms improvement = 1% revenue increase! [Source: Amazon] Google: 500ms delay = 20% loss of traffic & revenue 40% of consumers will wait no more than 3 seconds for a Web page to load before abandoning a retail site [Source: Forrester] After 3 seconds, each additional second causes 16% drop in satisfaction [Source: Forrester] Stats
4. Key optimisation forms If code/infrastructure are OK, performance issues often caused by ‘page-level’ factors, e.g. too many HTTP requests, page weight Page-level optimisation Code Infrastructure
5. Can cache heavily when users get same content E.g. anonymous users Lesser gains for personalised/collab/ security-trimmed content, but: Post-cache substitution (“donut caching”) can help: <asp:Substitution> control SP2010 internet specifics
6. Reduced page weight Refactored JavaScript/CSS & “Script On Demand” framework THEORY: only get what you need PRACTICE: further optimisation beneficial JavaScript minified by default Compilation/debug=“true” setting in web.config SP2010 improvements
8. Output caching (if appropriate, e.g. anon) Little/no processing for server! BLOB caching Static files (images/CSS/JS/media) served from WFE filesystem + browser cached Ensure max-age attribute set to avoid HTTP 304s CSS sprites http://CssSprites.com Updating is painful Optimisation top 6
9. Combine/minify custom JavaScript/CSS Watch for JS errors! Combining vs. splitting is a trade-off COB trick: suppressing unnecessary JS files http://www.sharepointnutsandbolts.com/2011/01/eliminating-large-js-files-to-optimize.html ~ 20% decrease in 1st time page load for our site IIS dynamic compression (for .aspx/.axd) Reduced data over wire Optimisation top 6 (ctd.)
12. Automates many optimisations Image sprites Combining/minifying JavaScript & CSS Etc. ISAPI filter installed on WFEs Good option where no optimisation expertise? Project decision – spend £ on product or implementation effort? Aptimize
14. Different bottlenecks to collaboration: CAVEAT: load test/monitor to know for sure Infrastructure bottlenecks
15. Measuring performance PAL (Perfomance Analysis of Logs) is useful – http://pal.codeplex.com Summary report for CPU, memory, disk etc. Collect perf counters whilst servers under load
16. VS2010 load testing good, but expensive: VS2010 Ultimate ~ £6-8k VS2010 Virtual User Pack (1000 users) ~ £3k For 30k users, need 3000 virtual users Without this, limited to 1 machine/1 core STOP PRESS 8th March 2011: new “VS2010 Load Test Feature Pack” = unlimited users now free with VS Ultimate Also test with client browser tools Hammerhead (Firefox) HttpWatch (IE) Measuring performance
18. Several forms of optimisation Page-level optimisation still required in SP2010 DIY approach or Aptimize Measuring is key Load test to establish page load speed during spike Combine with PAL to analyse hardware bottlenecks Summary