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 Action Size Date Who Comment
elsediff prefsperfpatch.diff manage 24.2 K 09 Sep 2004 - 09:03 CrawfordCurrie  
Topic revision: r9 - 13 Feb 2005 - 15:50:49 - SamHasler
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback