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

[FEATURE] Use PHP generator to prevent processing of all available site #4261

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

dkd-kaehm
Copy link
Collaborator

Use PHP generator with yield to process just the available sites needed How to test

With over 300 root pages it needs over 30 seconds to build up all available sites. With help of a PHP generator we can stop processing all available sites if just the first site is requested. It's also helpful to just check, if there are available sites.

This should speed up performance a lot.

  • Remove cache storing from methods of SiteRepository
  • Use hasAvailableSites in ModuleController
  • Remove cache-set check from tests for SiteRepository
  • Repair unit tests
  • Move check for duplicate sites to getAvailableSites. PhpStan
  • Remove unused imports

Fixes: #3939
Ports: #4154
Replaces: #4145

@dkd-kaehm dkd-kaehm force-pushed the port/4154_via_4145_orig_main branch from 1d4256f to ffcbe8a Compare December 12, 2024 15:16
@dkd-kaehm dkd-kaehm changed the title Use PHP generator to prevent processing of all available site [FEATURE] Use PHP generator to prevent processing of all available site Dec 12, 2024
@dkd-kaehm dkd-kaehm force-pushed the port/4154_via_4145_orig_main branch from ffcbe8a to d80e037 Compare December 17, 2024 11:49
Use PHP generator with yield to process just the available sites needed
How to test

With over 300 root pages it needs over 30 seconds to build up all available sites. With help of a PHP generator we can stop processing all available sites if just the first site is requested. It's also helpful to just check, if there are available sites.

This should speed up performance a lot.

* Remove cache storing from <has> methods of SiteRepository
* Use hasAvailableSites in ModuleController
* Remove cache-set check from tests for SiteRepository
* Repair unit tests
* Move check for duplicate sites to getAvailableSites. PhpStan
* Remove unused imports

Fixes: TYPO3-Solr#3939
Ports: TYPO3-Solr#4154
Replaces: TYPO3-Solr#4145
@dkd-kaehm dkd-kaehm force-pushed the port/4154_via_4145_orig_main branch from d80e037 to d7d7f62 Compare December 17, 2024 11:54
@dkd-kaehm dkd-kaehm merged commit 7fec14d into TYPO3-Solr:main Dec 17, 2024
9 checks passed
@dkd-kaehm dkd-kaehm deleted the port/4154_via_4145_orig_main branch December 17, 2024 12:36
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

Successfully merging this pull request may close these issues.

[BUG] Performance issues with a lot of sites
2 participants