Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Performance issues with a lot of sites #3939

Open
deschilter opened this issue Jan 30, 2024 · 3 comments
Open

[BUG] Performance issues with a lot of sites #3939

deschilter opened this issue Jan 30, 2024 · 3 comments

Comments

@deschilter
Copy link

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

@cricog
Copy link

cricog commented Jun 19, 2024

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) ?

@BugHunter2k
Copy link

This is still an issue. Is there any news with this?

@dkd-kaehm
Copy link
Collaborator

This is still an issue. Is there any news with this?

#4145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants