• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

The three variables $&, $`, and $' are known to have a performance penalty for all regex matches in an application. TWiki is doing a lot of regexes, so these should be eliminated though it will be difficult to actually measure the effect on a single regex.

Grepping through a SVN area brought a couple of candidates (not necessarily complete since grepping for $' had too many false positives, so I ignored it):

  • lib/TWiki/Configure/UI.pm - maybe irrelevant unless run under mod_perl DONE
  • lib/TWiki/Configure/Types/REGEX.pm - maybe irrelevant unless run under mod_perl DONE
  • lib/TWiki.pm - should be fixed (one line only) DONE
  • twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin/Parse.pm - several occurrences. Patch suggested at TWiki:Plugins.LatexModePluginDev, I lack any possibility to test it. (suggestion implemented - 11681.) DONE
  • twikiplugins/NatSkinPlugin/lib/TWiki/Plugins/NatSkinPlugin/Search.pm - one line containing $& DONE
  • twikiplugins/SectionalEditPlugin/lib/TWiki/Plugins/SectionalEditPlugin.pm - several occurrences. Too complicated for my simple brain right now. No
  • twikiplugins/AliasPlugin/lib/TWiki/Plugins/AliasPlugin.pm - one line containing $& DONE
  • twikiplugins/PerlDocPlugin/lib/TWiki/Plugins/PerlDocPlugin.pm - one line containing both $& and $` DONE
  • twikiplugins/DBCachePlugin/lib/TWiki/Plugins/DBCachePlugin/Core.pm - two occurrences of $& DONE
  • twikiplugins/ExternalLinkPlugin/lib/TWiki/Plugins/ExternalLinkPlugin.pm - one line containing $& DONE
  • twikiplugins/TouchGraphPlugin/bin/tgdb - one line containing $& DONE
  • twikiplugins/GoogleSearchPlugin/lib/TWiki/Plugins/GoogleSearchPlugin.pm - two occurrences of $& DONE
  • twikiplugins/PhantomPlugin/lib/TWiki/Plugins/PhantomPlugin.pm - has both $` and $' Apparently untested on TWiki 4 No

4.1.0 released


Summary Performance: Eliminate $&, $`, and $' from TWiki sources
ReportedBy TWiki:Main.HaraldJoerg
Codebase ~twiki4
SVN Range TWiki-4.1, Wed, 04 Oct 2006, build 11657
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins 11664 11680 11681
TargetRelease minor
Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r11 - 2007-01-16 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback