- Affected version
- 2.1.4
On my own sites 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
On investigating; I believe it is the
This style invalidation appears to occur when templates are imported, template modifications are imported, and phrases are imported.
This happens per web-request rather than at the end of the template/phrase rebuild/compiling jobs. With batch installing, and complex add-ons, this can result in a large number of requests during the installing phase.
The
On a few client sites; I've got some install scripts which simply prevent
is_processing
flag, these add-ons should not be actually running and points to some cache being repeatedly invalidated.On investigating; I believe it is the
TemplateRebuild
/TemplatePartialCompile
(and others) that use the \XF\Service\Template\Compile
which updates all styles last modified date, which then invalidates all cached css.This style invalidation appears to occur when templates are imported, template modifications are imported, and phrases are imported.
This happens per web-request rather than at the end of the template/phrase rebuild/compiling jobs. With batch installing, and complex add-ons, this can result in a large number of requests during the installing phase.
The
xf_css_cache
table is also evacuated per web-request, but before the style last modified date is updated, resulting in this table receiving a lot more write traffic than expected. This can result in xf_css_cache
causing unexpected deadlocks as well.On a few client sites; I've got some install scripts which simply prevent
updateAllStylesLastModifiedDate
doing any work installing/updating add-ons massively decreased the performance hit of installing add-ons.