New setting available in 5.17 should improve performance on most sites

Publicado
2019-09-12 13:04
Written by
DaveD - member of the CiviCRM community - view blog guidelines

Credit goes to other people but I wanted to point out a new setting now available as of 5.17.0 that should speed up most sites. At worst it should have no effect. It's like that button on traffic light poles - you press it and sometimes it does nothing but sometimes the light changes faster. Either way you're no worse off, except they now have your fingerprints on file.

For the impatient, just add this line to your civicrm.settings.php file: define('CIVICRM_TEMPLATE_COMPILE_CHECK', FALSE);  It's described at this link in the admin documentation. While this setting might eventually be the default, at the moment you need to add it manually.

CiviCRM uses a 3rd party tool called Smarty. What developers do is write code and words and numbers and mix them all together semi-randomly and put them in files. Some of them are smushed together in a way that Smarty understands. Those are called "tpl" files. Smarty uses these as "input" and then processes them and then keeps a cache of the processed versions so that when you click on things it doesn't have to process them every time. Smarty is also smart enough to know that it only needs to reprocess them again later if you've changed the input tpl files.

But to do that check to see if they've changed can sometimes take valuable milliseconds that when repeated lots of times adds up. While you're in the middle of developing, you want it to keep checking each time if you've changed something and reprocess it because you're constantly smushing more things into it, but on a live site you aren't (supposed to be).

So this setting turns off that check.

More info and appropriate credits can be found at this link.

Filed under