[dokuwiki] Re: Improving RSS performance (sorry!)

  • From: "Joe Lapp" <joe.lapp@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 16 Sep 2005 16:18:11 -0500 (CDT)

Oops.  I continue to embarrass myself.  I just discovered that the XML file is 
already being cached.  My face flushed pretty badly over this one.  =O

But fresh feed generation remains slow, even with my relatively small changelog 
file.  I propose:

> (4) When a page is rendered, we create an md5 file with extension .f 
> containing
> the RSS description for the page, unless the .f file already exists.  When 
> saving
> a page's new instructions, we delete the page's .f file.  (Drawback: the 
> description
> reflects the current file and not the cited revision.)

In other words, I'm proposing that we cache the RSS entry description at the 
time a page is rendered and pull each description from cache to generate the 
feed.  (The drawback already applies to the current feed.)

This eliminates the biggest remaining resource drain, after the rsort(): 
instead of deserializing all of the instruction files into object trees, 
concatenating them together into HTML, and stripping tags, we just load this 
stuff already predone.  By pre-doing this work at page-rendering time, for the 
intial rendering to create the cache, we eliminate one round of HTML generation 
for the page and also distribute the work across multiple page loads.

But what file extension should we use for the md5 file?  .s for summary?  .d 
for description?  .m for metadata?  At the moment I see this file being a 
serialization an associative array containing a 'title' and a 'desc' entry.  
Who knows, maybe later it will prove useful for other metadata... ?

~joe
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: