Permalink

Speeding up BlogSphere web performance

02/24/2005
    I was working on a DWA (formerly know as iNotes Web Access) project and gained insight into the caching strategy used by DWA to speed up client performance. I thought this would be usefull for other applications too and started with BlogSphere and ONPD (the Open Notes Picture Database). 

    To determine the speed of a site you should NOT use a stop watch. Use a tool like IBM Page Detailer to get exact numbers. 
    I started by having a look at one document in my Blog. After deleting the browser cache I had a load time of 5,5 seconds for 53 items with a total size of 155K. The 53 items are a CSS files, JavaScript files and images. 

    A reload (click on the Permalink, not the reload button in IE) of the page still took 4,35 seconds but the size was just 39K this time. So what happened? 
    The browser (Internet Explorer in this case) had the whole page in it's cache but hat to contact the server for every item to ask the Domino server if it has been modified. In this example, the Domino server replied to the HTTP GET request by sending the HTTP Reply Header with status code 304, which means "not modified". 

    - So the cache saves bandwith but validating still takes some time. 

    Given the theory, that I do not update all design elements in this Domino web application I started to look for cacheable content. 
    The images seems to be an easy start so I reconfigured Domino to add a HTTP Reply header for all URLs with the following patterns: 
    */images/* 
    */icons/* 
    I configured the rule to add the reply header just in case the application didn't and configured 30 days as expiration date. 

    After a tell http refresh config the server was ready for another test. 

    On the next page reload the server added the following to his reply: 
    Expires: Sat, 26 Mar 2005 23:59:59 GMT 
    This tells the browser to display this icon (in this example) without validating it with the server. 

    There are still other URLs in BlogSphere responsible for images so I added */2/* which will work for the emoticons in the comments area. 

    After these changes the loading time is 4,1 seconds for a size of 39K. Still room for improvement. 

    What remains uncached are CSS files and the JS files. BlogSphere loads them from a view names /0/ so I add another rule for pattern */0/* but this time I configure it to expire after one day because I may want to change the CSS file from day to day. 

    The result is great: 1,3 seconds for 32K of data and only 6 connections to the server. 

2458 Aufrufe .
Hinweis
Das Weblog gibt meine persönlichen Ansichten und Kommentare wieder und entspricht nicht den Positionen meiner aktuellen oder früheren Arbeitgeber oder Kunden.
Über mich
Nach Kategorie
Meine Seiten
netcraft Linux host Blog Admin OpenNTF
Monatsarchiv