[pmwiki-users] The Philosophy of PmWiki: adding to the core

Patrick R. Michaud pmichaud at pobox.com
Fri Nov 8 20:59:15 CST 2013

On Sat, Nov 09, 2013 at 12:14:38AM +0100, Eric Forgeot wrote:
> On 03/11/2013 22:54, Tamara Temple wrote:
> On the other hand, there is something I like very much on dokuwiki,
> and find annoying on pmwiki: it's the way data are stored. I regret
> all history and metadata are kept in the same files in pmwiki, I
> also guess it might impact a bit the performance if it loads the
> whole data when reading the content of the files, but I may be wrong
> on this point.

Data and history data in PmWiki's files are always stored 
most-recent-first, so PmWiki almost never has to read the entire
data file except when editing a page or displaying history.
When simply reading or scanning a page, PmWiki will stop reading
the file as soon as the first history entry is found.

Storing data and metadata in a single file was a very conscious 
design choice in PmWiki -- I wanted pages to be well encapsulated
and didn't want to ever have to worry about them getting out-of-sync.
Keeping them separate is also a perfectly valid design choice; for
my needs it just made much more sense to keep it all together.

> I also regret line breaks and such are mangled in pmwiki, which
> means you can't easily edit your data from outside a web browser,

I agree a fair bit on this point -- there are many times that I
wish for a plainer-text version of the files.  That's actually
quite pluggable, however; we could certainly have a module that
stores the files in a more plaintext form.  But there's also a
very strong issue of security at play -- part of the advantage
of PmWiki's encoding is that it also limits a variety of attack

> Dokuwiki also support out of the box cached data. I haven't tried to
> achieve the same on pmwiki, but it looks complicated to set up (for
> example with http://www.pmwiki.org/wiki/Cookbook/FastCache).

PmWiki does as much caching as it can by default.  With caching
there's a really difficult balance to be struck between dynamic
page content and ability to cache... and again we've tended to
favor dynamic content over caching.

Be sure to set or look at the $PageCacheDir and $EnableIMSCaching
variables if you aren't doing so already.  (PmWiki's built-in
page caching features seem to be underdocumented at the moment,
hopefully someone can help improve that!)


More information about the pmwiki-users mailing list