[dev] Template Generator with large number of DynamicFields was very slow

Keith Moore tenareth at gmail.com
Tue Aug 20 23:24:13 GMT 2013


We were taking advantage of the ProcessManagement functionality and using a
lot of DynamicFields to provide a much more fielded workflow of certain
functions such as Release Management when we started to notice performance
of Notifications decline, to the point each notification was taking 6+
seconds.

After quite a bit of investigation the root cause was in
TemplateGenerator.pm.  The system loads up every single active
DynamicField, loads it's Key and Viewable Value and creates a large hash
that it then cycles through and attempts to do a string replace.  This is
especially painful since we didn't even use any DynamicFields in our
response templates.

Therefore I patched ours to find out which fields are needed and only load
those.  It resolved our performance issue while maintaining the
functionality.

Providing the patch here, in case you want to include it in a future
release.

-- Keith Moore


 TemplateGenerator.patch<https://docs.google.com/file/d/0B5_W7RGI9GFpUzhJQ3pWLTRnMlE/edit?usp=drive_web>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.otrs.org/pipermail/dev/attachments/20130820/7ac58256/attachment.html>


More information about the dev mailing list