-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Slight performance improvements for Dir::inventory()
#6218
Slight performance improvements for Dir::inventory()
#6218
Conversation
6843143
to
9e36dec
Compare
Are there any before/after numbers to compare this or is there a good way for me to compare locally? |
8e92a46
to
7d97311
Compare
To run it yourself, you need to copy the added performance tests from However, for me the result seems to be worse now after 7d97311 |
That's so weird. Do you have any idea why this could perform worse? |
Co-authored-by: Bastian Allgeier <mail@bastianallgeier.com>
7d97311
to
c903e6b
Compare
This reverts commit c903e6b.
@bastianallgeier I have reverted c903e6b again. With it, the performance was worse than After reverting that change, this PR shows slight improvements over My guess would be that for multilang installations, the difference isn't bad. But in the bench tests with single lang, calling the app instance even with |
Can't we also use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the refactoring. Besides performance, the new structure makes much more sense and is easier to read and understand IMO.
I think it could still have performance downsides for multilang inventories without children (currently app instance wouldn't be called then at all, after the change it would be called). |
Co-authored-by: Lukas Bestle <lukas@getkirby.com>
This PR …
Tried to fix #5126 - while the issue itself remains without a good solution, some improvements to the methods structure and performance could be made. Added those in this PR.
Refactored
Dir::inventory()
Housekeeping
Dir::inventory()
with various number of page modelsReady?
For review team