Tags:
archive_me1Add my vote for this tag create new tag
, view all tags
The attached patch (patch against 1747) gives a 3.5 Athensmarks performance improvement by recoding PrefsDotPm for performance. The most effective change is changing the way it expands variables; instead of iterating over every variable and doing a s/// for that variable in the topic text, it finds all occurrences of %\w+% in the topic text and tries to replace them with a variable value. It also optimises the way the prefs are stored, using a single hash instead of two arrays and a hash to store the preferences.

athens performance = 100 Athensmarks

Release Skin Plugins Time per page Athensmarks
mine   DefaultPlugin, InterwikiPlugin .5750 23.4700
svn   DefaultPlugin, InterwikiPlugin .6733 19.8700

-- CrawfordCurrie - 09 Sep 2004

This is now in SVN. Thanks Crawford.

-- PeterThoeny - 28 Sep 2004

Thanks Peter!

-- CrawfordCurrie - 28 Sep 2004

Beware using \w if locales are turned on: it can be slow since it means alphanumeric including 8-bit or (future) UTF-8 characters. Better to use [A-Z0-9_] although it's more typing.

-- RichardDonkin - 13 Oct 2004

Thanks Richard - good tip!

-- CrawfordCurrie - 14 Oct 2004

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatdiff prefsperfpatch.diff r1 manage 24.2 K 2004-09-09 - 09:03 CrawfordCurrie  
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2005-02-13 - SamHasler
 
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.