You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Installations with a lot of sites (50+) can run into performance and memory issues.
This happens when \ApacheSolrForTypo3\Solr\Domain\Site\SiteRepository::getAvailableSites is called, because when the site is built, new instance of the TSFE is created. Multiple if you got multiple Languages with fallbacks.
Every TSFE contains the entire TypoScript setup array, which can be quite large.
Occurrences Backend-Module initializeAction
The initializeAction for the Backend Modules calls the method autoSelectFirstSiteAndRootPageWhenOnlyOneSiteIsAvailable which in turn calls getAvailableSites. This call is only relavant when only one site exist.
Backend-Modul initializeView
It is also called in initializeView for the Backend-Modules. This call is to check if the are any sites configured.
Scheduler Site-Selection
The scheduler Module is also affected, because the Tasks require a site to index/re-index. The options for the dropdown are created using the result of getAvailableSites. This means the call is just to get the configured sites.
Expected behavior
It seems wasteful to create multiple instances of the entire TSFE, just to get the amount of available sites or the name and rootPageId.
Used versions
I noticed this in TYPO3 12 LTS but the creation of the TSFE instances when building sites has been introduced in this commit: ddcbc3b
The text was updated successfully, but these errors were encountered:
Maybe one solution would be to replace \ApacheSolrForTypo3\Solr\Domain\Site\Site::$configuration by an on-demand getConfiguration() method that would do the TSFE processing (and that could have its own cache if needed) ?
Describe the bug
Installations with a lot of sites (50+) can run into performance and memory issues.
This happens when
\ApacheSolrForTypo3\Solr\Domain\Site\SiteRepository::getAvailableSites
is called, because when the site is built, new instance of the TSFE is created. Multiple if you got multiple Languages with fallbacks.Every TSFE contains the entire TypoScript setup array, which can be quite large.
Occurrences
Backend-Module initializeAction
The initializeAction for the Backend Modules calls the method
autoSelectFirstSiteAndRootPageWhenOnlyOneSiteIsAvailable
which in turn callsgetAvailableSites
. This call is only relavant when only one site exist.Backend-Modul initializeView
It is also called in initializeView for the Backend-Modules. This call is to check if the are any sites configured.
Scheduler Site-Selection
The scheduler Module is also affected, because the Tasks require a site to index/re-index. The options for the dropdown are created using the result of
getAvailableSites
. This means the call is just to get the configured sites.Expected behavior
It seems wasteful to create multiple instances of the entire TSFE, just to get the amount of available sites or the name and rootPageId.
Used versions
I noticed this in TYPO3 12 LTS but the creation of the TSFE instances when building sites has been introduced in this commit: ddcbc3b
The text was updated successfully, but these errors were encountered: