We had a big server snag when clearing caches for the first time post BE. There are a few upstream discussions / patches / techniques I can dig into to try to improve this
|wikimedia/fundraising/crm/civicrm : master||Don't parse non-smarty through smarty|
Chattering in IRC, it sounds as though we should set up an interim fix--a process-control task to purge cruft either by drush or by a bash find & delete. I'm happy to help set that up if I can get some guidance on what to purge and when.
OK so plan is to add
define( 'CIVICRM_TEMPLATE_COMPILE_CHECK', FALSE);
to our CiviCRM settings.php file
The Smarty documentation recommends that for production per - https://www.smarty.net/docs/en/variable.compile.check.tpl & my digging has not come up with any counter-indications.
Separately I have a PR to reduce smarty processing
It would be nice to see if there is a performance impact
(well everything under that directory).
Smarty creates files when it caches stuff. When I clear caches it deletes the files. However, it doesn't delete the folders it seems. I've deployed changes to dramatically reduce how many files it creates so clearing out the old folders will make it easier to see what is being re-created post change
The files I am seeing in there now are
templates_c/en_US$ ls -R * | grep php
This is a BIG improvement