The ActiveTheme objects contain an ActiveTheme object for each base theme - although this is never really used. This makes the theme.active_theme.seven
cache entry much larger than necessary.
Reduce the amount of stuff stored in the ActiveTheme class by deprecating the ability to store ActiveTheme objects for base themes and store the extension object instead.
Also this is likely to be a perfomance boost because
select length(data) from cache_bootstrap where cid = 'theme.active_theme.seven';
+--------------+
| length(data) |
+--------------+
| 90370 |
+--------------+
mysql> select length(data) from cache_bootstrap where cid = 'theme.active_theme.seven';
+--------------+
| length(data) |
+--------------+
| 43590 |
+--------------+
Here's a profile of cold caches showing the improvement from storing less stuff and doing less stuff - https://blackfire.io/profiles/compare/e21a0d28-9f1e-4488-b094-f78bec83b8...
Here's a profile of warm caches showing the improved memory usage - https://blackfire.io/profiles/compare/a4045574-796a-421b-a518-a49369d63c...
None
\Drupal\Core\Theme\ActiveTheme::getBaseThemes()
is deprecated. There is no direct replacement. Base theme extension objects can be retrieved from the active theme using the new \Drupal\Core\Theme\ActiveTheme::getBaseThemeExtensions()
method. In order to get active theme representations of any theme you can use \Drupal::service('theme.initialization')->getActiveThemeByName($theme_name);
Fixed
8.7 ⚰️
Last updated
It affects performance. It is often combined with the Needs profiling tag.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.