[dokuwiki] Re: Improving RSS performance

  • From: "Joe Lapp" <joe.lapp@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 15 Sep 2005 22:41:05 -0500 (CDT)

Ouch!  That rsort() in getRecents() has got to hurt.  It's reverse-sorting the 
entire changelog.

Can we assume that the changelog is properly chronological, so no *sorting* is 
necessary?

I'd suggest using array_reverse(), but it would be even better just to do a 
regular for-loop iterating from the last line to the first line.

How big can the changelog get?  Does DokuWiki ever truncate or splice it?  
Unless it gets astonishingly huge, I doubt the time to read the file into 
memory has much effect on page load times, but it will certainly have an effect 
on the server's peak capacity.  That's a lot of string objects.

From a server availability perspective, it would be better to periodically 
archive the changelog, sort of the way Apache periodically archives access_log 
with dot-number extensions.  I bet the little bit of additional slowdown 
scanning from log to log would be unnoticable, even without caching.

Okay, once we add caching, do we want the feed to continue reporting only the 
latest edit for each file (and not preceding edits for the file)?  Do we want 
to make this a configuration variable?

Let me know if we should shelve this conversation until after the next DokuWiki 
release.

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

Other related posts: