[Pmwiki-users] Some issues with the latest pmwiki release

Patrick R. Michaud pmichaud at sci.tamucc.edu
Tue Apr 29 09:59:32 CDT 2003


On Tue, 29 Apr 2003, Jonathan Scott Duff wrote:

> Actually the numbers used are somewhat important if this is a feature
> that PmWikiAdmins are likely to use heavily.  You don't want to
> be too limited by the finite space between existing LinkPatterns.  I'd
> suggest starting with 100, 200, 300, etc.  Or, alternatively, use
> floating point numbers.

A couple of quick answers:  First, the numbers aren't the only
story--there can be multiple entries within a single number (in my
example, all of the InterMap links were stored as number 30).  Entries
at a common number are processed in the order in which they were
stored in the array.  

Also, arrays in PHP (like perl) aren't quite as sparse as one might
like.  Thus something stored at element 700 means that elements 0 through
699 are automatically created and eat up some space.  So, there's
some reason to keep the numbers small -- 0..70 takes up one tenth of
the memory as 0..700.  

Floating point numbers as indices aren't an option in PHP.  I'd have
to go to strings in that case, and of course sorting strings introduces
weird things (e.g., "11" comes before "2") and so it seems that just
sticking with integers is best.

Pm





More information about the pmwiki-users mailing list