[pmwiki-users] RFC: capitalization collision handling

Oliver Betz list_ob at gmx.net
Mon Mar 12 11:39:15 CDT 2007


Patrick R. Michaud wrote:

> > The other, IMO more important problem, are typos. Users mistype the 
> > case of a pagename and create a (link to a) new page instead of 
> > referencing the existing page.
> 
> In the general case I don't think this happens all that frequently.

That's correct, but in a large wiki it's annoying even if it happens 
only for a small fraction of the pages, see the current status of 
pmwiki.org:

Groups: 
Testgroup, TestGroup
Pmwikiit, PmWikiIt
PmWikiDe, Pmwikide, PmwikiDe
Sandbox, SandBox
PmWikiFr, Pmwikifr
PITS, Pits
PmWikiHu, Pmwikihu
Pmwikija, PmWikiJa
TEST, Test
PMWIKI, PmWiki, Pmwiki
Pmwikino, PmWikiNo
Groupname, GroupName
PmWikiPtBR, Pmwikiptbr, PmWikiPtBr

Pages: 
Test.PtvNO, Test.PtvNo
Cookbook.Homepage, Cookbook.HomePage
EmacsModes.Pmwiki-mode, EmacsModes.Pmwiki-Mode
Cookbook.ModesConcept, Cookbook.Modesconcept
Cookbook.Pmwiki-DivsSkin, Cookbook.PmWiki-DivsSkin
Cookbook.ThumbList, Cookbook.Thumblist
Cookbook.AttachlistEnhanced, Cookbook.AttachListEnhanced
Cookbook.ZAPData, Cookbook.ZAPdata
Cookbook.Javascript, Cookbook.JavaScript
Test.PtvMaybe, Test.PtvMayBe
Cookbook.Simpleskin, Cookbook.SimpleSkin
Test.PtvYES, Test.PtvYes
Cookbook.Clipboard, Cookbook.ClipBoard
Profiles.LukStafi, Profiles.Lukstafi
Cookbook.Converttable, Cookbook.ConvertTABLE
Category.Cms, Category.CMS
Cookbook.MultiLanguage-Archive, Cookbook.Multilanguage-archive
Cookbook.Neatskin, Cookbook.NeatSkin
Profiles.HenryGurr, Profiles.Henrygurr
Cookbook.WikiFarmStepByStep, Cookbook.Wikifarmstepbystep
Test.Backlinks, Test.BackLinks
Category.Todo, Category.ToDo
Profiles.Jb, Profiles.JB

[...]

> > 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).

BTW: that's roughly the same amount as "ls" takes on both machines. I 
didn't expect that perl is so efficient, and I guess php is similar.

Since this check is needed only when a new or changed page is 
submitted, I would accept this small delay.

But I didn't consider that the search needs to be supported by the 
page storage like "Per-group sub-sub directories" and pagestoregz.

Oliver
-- 
Oliver Betz, Muenchen




More information about the pmwiki-users mailing list