Tags:
create new tag
, view all tags
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. smile )

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

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatdiff Prefs.pm.diff r1 manage 11.1 K 2003-08-19 - 05:37 PavelGoran Patch for StoreDotPm
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2004-08-20 - CrawfordCurrie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.