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
--
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