Skip expensive smarty Processing
authoreileen <emcnaughton@wikimedia.org>
Tue, 10 Mar 2020 01:13:44 +0000 (14:13 +1300)
committereileen <emcnaughton@wikimedia.org>
Tue, 10 Mar 2020 20:47:30 +0000 (09:47 +1300)
commit1441a37891d261f250ae7d79048d3a4e09b8881a
tree1be5ad2b8c95347e5ce9479ff378b09403cad434
parentfff6d9bd8e686a662e1c0b321c1f71026995f8ba
Skip expensive smarty Processing

On digging into speed & disk use issues I find that significant disk space is being
used on smartyProcessing of greetings. The same also seems to be true of display names. This is
a first shot across the bows but I'm  also investigating
1) also doing an early return before replaceGreetingTemplate
2) changing  the   smarty ->fetch call to pass 'eval' rather than  string.
Despite the gut-reaction the docs identify this  as correct
https://www.smarty.net/docs/en/resources.string.tpl and eval is not eval

From my local profiling this  code also kicks in  on delete & it's likely we will actually
see a decrease in overall test time on this
CRM/Contact/BAO/Contact/Utils.php
CRM/Utils/String.php
Civi/Test/Api3TestTrait.php
tests/phpunit/api/v3/ContactTest.php