Currently (15 Aug 2003) TWiki handles its preferences in a way that is hardly optimal: preferences are stored as two arrays (one is for keys and the other is for values), and preference look-up is done by means of key array iteration.
Moreover, for preferences of all webs other then the current one, there is the only "alternative" storage; so, say, when
Sandbox
is the default web, and some preference value for
TWiki
web is queried, this web's preferences are cached in the "alternative" storage, but if a preference value for
Main
web is queried then, the cached preferences for
TWiki
are discarded. (This maybe doesn't have a noticeable performance impact, but it looks rather ugly.
)
I rewrote those parts of
PrefsDotPm that related to preferences storing and retrieving, so that preferences were stored in a way that permitted look-up via hashes. (There is a comment in
PrefsDotPm that urges not to use hashes because of significance of preferences order; my implementation takes order into account where it matters.) The patch will be posted shortly.
--
PavelGoran - 15 Aug 2003
Here is the patch for
StoreDotPm, generated against
TWikiBetaRelease from 11 Aug 2003. (Aside from changing preferences handling, I removed unnecessary
'o'
option for regular expressions, see
ModPerlOnceRegex.)
--
PavelGoran - 19 Aug 2003
I like this patch, but it doesn't go far enough for me. I'm going to use these ideas and do some refactoring, and commit the result.
--
WalterMundt - 11 Feb 2004
Done! I've committed changes incorporating the ideas in this patch to CVS.
--
WalterMundt - 12 Feb 2004
Walter, please set the "ScheduledFor" and the "*Progress" fields also for internal refactoring work. That way we get a quick view on what has been done and what needs attention before a release (like docs, which does not apply in this particular case)
--
PeterThoeny - 12 Feb 2004
No problem, I'll do that in the future.
--
WalterMundt - 12 Feb 2004
Category:
TWikiPatches