[pmwiki-users] RFC: capitalization collision handling

Patrick R. Michaud pmichaud at pobox.com
Mon Mar 12 12:28:52 CDT 2007


On Mon, Mar 12, 2007 at 05:39:15PM +0100, Oliver Betz wrote:
> > > Two possible methods for collision handling handle chime in:
> > > 
> > > 1. Simply _force_ links and pagenames to the existing capitalization. 
> > > ...
> > 
> > The problem is finding the "existing capitalization" -- at the moment
> > there's not an easy way to do this on case-sensitive filesystems
> > without doing a full scan of the wiki.d/ directory... and that can
> > be a very expensive operation.  
> 
> I checked this with a quick perl hack using opendir/readdir to read a 
> directory listing with 5000 entries into an array.
> 
> It takes 0,3s on my old 1GHz PIII (cygwin) and 0,02s at my web hoster 
> (Linux, I have no clue how to get information about the hardware he's 
> running).
> ...
> Since this check is needed only when a new or changed page is 
> submitted, I would accept this small delay.

Actually, the check needs to be performed for every link that
appears in a page at the time the page is displayed, not just when
it is saved.  For example, if a page's markup contains [[wiki sandbox]], 
then PmWiki has to determine if the WikiSandbox page exists so that it 
knows what type of link to display.  (We can't do the check when the
page is saved... what if WikiSandbox doesn't exist at the time the
page is saved but is then created afterwards?  Or vice-versa?)

If scanning the directory adds 0.2 sec to every page display, that's 
probably unacceptable for many sites.  I know that the pmwiki.org 
would have difficulty coping with it... especially since the files
are physically held on some sort of network-based storage device.

Pm



More information about the pmwiki-users mailing list