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

EZP-32460: Move problematic call to SystemInfoCollector::collect to outside of constructor #63

Merged
merged 2 commits into from
Feb 1, 2025

Conversation

ryanolee
Copy link
Contributor

What

Removes problematic call to FS bound function. This should globally cut ibexa platform request processing times by ~ 7 MS depending on the size of the composer.lock file and the storage medium being queried.
See https://issues.ibexa.co/browse/EZP-32460 for more details

How

By moving the actual parsing of the composer.lock file to when it is required by calls to IbexaSystemInfoCollector::collect instead of the __construct method where it is seemingly invoked most requests

Why

Over a large number of requests, especially many short ones this particular call can result in noticeable performance degradation compounded in N+1 scenarios where this code path can be hit many times over the course of a number of requests or longer term use of the admin UI cc @ibexa/php-dev

@adamwojs adamwojs changed the title feat(EZP-32460): Move problematic call to SystemInfoCollector::collect to outside of constructor EZP-32460: Move problematic call to SystemInfoCollector::collect to outside of constructor Jan 30, 2025
@adamwojs
Copy link
Member

Hi! Thank you for great contribution. Could you please change the target branch to 4.6 and rebase the PR ? If you are not able to do so, please let me know and I will take over PR.

@ryanolee ryanolee changed the base branch from main to 4.6 January 30, 2025 16:22
@ryanolee
Copy link
Contributor Author

Rebased it @adamwojs . Thanks for having a look!

Copy link

sonarqubecloud bot commented Feb 1, 2025

@adamwojs adamwojs merged commit b400850 into ibexa:4.6 Feb 1, 2025
16 checks passed
@adamwojs
Copy link
Member

adamwojs commented Feb 1, 2025

Thank you for contribution @ryanolee! We will include patch as part of the 4.6.17 release.

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.

5 participants