On my own site and another large site, I've observed that XF will use massively more CPU during the add-on installs & adding new templates/styles operations above what is expected (that is, every other session not just the admin session doing the changes). With the is_processing
flag, these shouldn't be actually running and points to some cache being repeatedly invalidated.
What I did notice was the jobs TemplateRebuild
/TemplatePartialCompile
(and some others) use the \XF\Service\Template\Compile
which updates all styles last modified date, which then invalidates all cached css. This happens per web-request rather than at the end of the template rebuild/compiling jobs. The PhraseRebuild
job would be similar.
Add-on install is also impacted, as each template import which rattles around before hitting a template recompile, and then again with template modifications. xf_css_cache
is also evacuated immediately, but before the style last modified date is updated, resulting in this table receiving a lot more write traffic than expected.
With batch installing, and complex add-ons, this can result in a large number of requests during the installing phase.