[Pmwiki-users] Cache system with PmWiki

Patrick R. Michaud pmichaud
Fri Sep 10 06:55:10 CDT 2004

On Fri, Sep 10, 2004 at 09:58:57AM +0200, Alexandre Courbot wrote:
> Another solution could be limited 
> caching of the Wiki markups (or at least part of it), since this is the 
> part of the processing that takes the more time.

That might be workable.  It'd be useful to go through the existing list
of markups and see which ones would be candidates for being processed
at edit time.  

One of the biggest time eaters is the use of \\ at the end of line to
generate line breaks.  Many people have created pages where nearly every
line ends in a \, and this really slows down the processing because the
pattern matching engine has to match each pattern to the entire page
(very long lines) instead of being able to process things line-at-a-time.
There are several answers to this:  (1) find a way to optimize \\ so that
this pathological usage doesn't take forever, (2) improve the documentation
so that authors don't find themselves doing this, which leads to (3) find 
a way to allow line breaks to be honored in the markup text.  (And to 
pre-empt the flood of replies to this:  No, I'm still not going to 
make this condition the default.)

Actually, one of the things that currently takes a fair bit of time 
is the fact that PmWiki reads a page's entire history into memory
even if it's not going to be used.  The page history needs to be read
for post, diff, and restore operations, but not much else.  So I'm
planning to modify the page storage so the history is written
last, and so there's an option to read a page without reading its
history.  One PmWiki user reported that this provided a significant
(factor of 10x) speed up in displaying pages.

In the meantime, I'm going to introduce a couple of variables to 
display the time needed to process a page and to process the markup.  
We can use this information to tune things a fair bit, or at least make
sure we're optimizing the correct places.


More information about the pmwiki-users mailing list