Made some speed-ups in weblog views ( sidebar caching )

07-September-2005

email this
The week before last we made some largish speedups in KNotes weblog rendertimes. Partly we achieved this by a careful review of the index structure of the RDB, but a big savings was made by caching the content of most of the sidebars. These are now cached, but invalidated automatically by most events which could impact their content. The exception is adding sidebar links - you need to click the refresh-sidebar link in your manage sidebar to refresh the sidebar after adding or changing sidebar links

Our colleagues in the NGRF gavea big hands-on workshop in Cyprus Friday August 26, and were concerned about performance. It can really exercise a server having a couple dozen logged-in users demanding frequent refereshes of dynamic content... as we learned to our embarassment in a workshop early in the spring :o)

Since the spring workshop we have made numerous techie performancee tweaks to the basic server technoology we run, but at the same time we had been amassing the features in KNotes.

KNotes began life as a very nippy application - in fact, performance was one of our number-one goals. But in the way of these things, as features grew so did render time. We were due a thorough review of the speed of rendering an the size of the markup deleivered. So we made that review in advance of the Cyprus workshop.


Extended text for this entry:


We found that we could improve performance considerably by tweaking the indices which we;'d neglected, but also identified a number of areas in the rendering of weblog views where some content that changes infrequently was being rendered on every pageload in expensive ZPT iterations and multiple SQL fetches.

There are other caching enhancements that can be made, but the obvious easy win wad to cache the content of most of the sidebars. We have done this now, and the performance improvement is pretty dramatic in big busy blogs with long archive histories and lots of categories, etc.

The downside of caching, of course, is invalidation :o) We are automatically triggering a recalculation of the sidebar contents whenever a discussion or blog item, knlink or knexfile is edited in the weblog. This, however, does not cover the case where the sidebar links are changed; at the moment you have to click a new link in the manage sidebar to refresh the sidebar cache. We'll see about other wayd to trigger an invalidation from sidebar-links changes. I have also considered other methods for managin the siebar links - for instance 3rd party blogroll services, or special delicious accounts. The main advantage of the surrent system (whereby a Plone folder contains all the sidebar links) is that you can easily mak a weblog link to special features and content just by creating subfolders or non-link content types within the sidebar links folder. In any case, the current system will do for a while.

We'll be making further performance improvements over the coming week or two. Watch this space!


Mike Malloch; 07-September-2005 14:00:14; forum (0) help

Comments please

If you are already registered here, please click the "Login" button to send your username/password with the comment. Click the "Anonymous" button to leave a comment without logging in.

Please tell us who you are

E-Mail Address (Required)
We need a valid email address in order for you to post a comment. You will recieve an email containing a special validation link. The comment will not be published until validated
Name
Please leave your name
Title
Lead-in
Body Text ( HTML tags are allowed )
Validation
Please enter the text from the image above
Preview your comment

Linking and trackbacks

When linking to this weblog entry, please use the 'permalink', which is http://www.knownet.com/Members/mmalloch/blog/entries/3145144767

Some weblog systems will ask you for a "trackback link" (most systems will find this special 'hook' automatically, in the code for this page).

The trackback link for this entry is http://www.knownet.com/Members/mmalloch/blog/entries/3145144767/tb