Hi Solspace,
I recently noticed my site’s performance was pretty bad. I activated some ExpressionEngine debug output and saw the Acronym module ran two queries for each exp:acronym tag being used in the templates.
So I had a look at the source code and made some modifications for better performance as advised in the ExpressionEngine developer performance guidelines at http://expressionengine.com/docs/development/guidelines/performance.html
You can get the optimized mod.acronym.php file in a zip archive at http://www.neverpanic.de/temp/mod_acronym.zip
I did a little benchmarking (the benchmark source code is still in the file, but commented - so if you want to run the benchmark on your own, go ahead):
On the page I tested, there were 9 calls to 1 acronym group, time elapsed for this with the original module 0.47111 seconds, time elapsed with my optimized module 0.06547 seconds.
That’s roughly a 86% drop.
I guess you’d probably want to update your module accordingly, so others can benefit from the optimizations aswell.
I would have notified you using the contact form, but I can’t attach PHP files and it seems the contact form blocks submissions with URLs (ever thought of using the freeform_module_validate_end hook in the Akismet extension for spam checking? I hacked that into my Akismet extension - it’s messy though).
