Please find attached hereto an updated version of the file "product-acronym_mod.xml" with improved performance.
Since it seems (at least subjectively) that the time it takes to display a complete forum page is longer when the Acronyms-addon is installed, I applied some more modifications in an attempt to increase its performance.
Instead of matching the right separator character, capturing it and re-inserting it into the output stream (that's what the "\\2" does in the script), why not check the next character with a zero-width positive look-ahead regular expression?
(Especially since the left separator character is already checked with a zero-width positive look-behind regular expression?)
This saves the time that was needed before for the intermediate storage and interpolation (i.e., insertion) of the captured character into the output stream.
But better still, this now allows us to put the subexpression (?![^<>]*>) at the very end of the regular expression. Because when there is no valid right separator character anyway (which can be checked in a single step, in O(1) time complexity), it is not necessary to execute this search for a closing ">" (which can potentially run until the end of the input stream, and therefore has O(n) time complexity) anymore at all.
For an explanation in German of the nature of these modifications/improvements, please see also my corresponding
posting in the thread "
[vB 3.5.x]Akronyme f?r vB".
I hope you might find this new version useful.
Best regards,
ibeji
in the name of Feechen