180 likes | 348 Views
Web Site Performance . What makes web sites slow? Back end Front end Tools for measuring performance Firebug / YSlow Visual Studio Test Edition W 3.org html and css validators. Web Site Performance . Back end – Many Culprits . Db queries
E N D
Web Site Performance • What makes web sites slow? • Back end • Front end • Tools for measuring performance • Firebug / YSlow • Visual Studio Test Edition • W3.org html and cssvalidators
Web Site Performance • Back end – Many Culprits • Db queries • Calls to 3rd party systems (e.g. mainframe) • Mashups of multiple sources • Intensive computation • Web server performance settings (IIS) • Hardware, network bandwidth …
Web Site Performance • Back end – Many Solutions • DB Tuning • Indexes, table joins, archiving • SQL Server Profiler, Tuning Advisor • IIS Tuning • MaxConns, IOThreads, WorkerThreads • Caching
Web Site Performance • Caching – First Steps • Identify expensive data or output • Evaluate volatility • Evaluate frequency of use • Separate volatile data from non-volatile • Choose the appropriate caching mechanism
Web Site Performance • Caching • Output Caching • Data Caching • Cache Dependencies • Demos…
Web Site Performance • Output Caching - OFF
Web Site Performance • Output Caching - ON
Web Site Performance • Output Caching - OFF • Output Caching - ON • Output Caching - ON (10 seconds)
Web Site Performance • Front end “… for most web pages, less than 10-20% of end user response time is spent getting the html document from the web server to the browser. If you want to dramatically reduce the response times of your web pages, you have to focus on the other 80-90%...” - Steve Souders, High Performance Web Sites
Web Site Performance • How browsers work with HTTP 1.1 Two requests at a time per hostname
Web Site Performance • Rule #1: Make Fewer HTTP Requests Combine javascript files Combine css files Use image maps or css sprites
Web Site Performance • Rule #2: Use a CDN
Web Site Performance • Rule #3: Add an expires header <staticContent> <clientCache httpExpires="Mon, 5 Apr 2010 00:00:00 GMT" cacheControlMode="UseExpires" /> </staticContent>
Web Site Performance • Rule #4: Compress the response
Web Site Performance • Rule #5: Put the stylesheets at the top • Rule #6: Put the javascript at the bottom
Web Site Performance • Rule #10: Minify Javascript and CSS
Web Site Performance • Rule #11: Avoid redirects
Web Site Performance • Extras: • Make sure your html and css are valid • (http://validator.w3.org/) • Turn off View State for controls that aren’t using it