-
Notifications
You must be signed in to change notification settings - Fork 97
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
Huge performance regression caused by new class finder package #691
Comments
Thx for your feedback, looks like it's related to #671 |
Not really, the namespace containing graphql stuff has very limited number of classes, that isn't taking time. For now I've forked both this package and graphqlite symfony-bundle and reverted changes related to class loader, it works like charm. |
Hi all, I've investigated the issue a little bit. In all the other environments, I've found that the finder is iterated multiple times from For this purpose, I've created a @faizanakram99 could you please test these modifications in your project and give me a feedback on the performance? |
@alekitto thanks for looking into this |
Thank you, I will try to test it this week. |
Did anybody had a chance to test it? I've bumped into those performance issues in my project. |
@alekitto thanks, I can't get it working with https://github.com/fogrye/graphqlite-bundle , apparently the bundle references some constants which don't exist, I think some commits were made to thecodingmaching/graphqlite::master since v7.9 release which removed some stuff that the bundle (fogrye/graphqlite-bundle) still references and since your fork was created from master it also contains those changes making it incompatible with https://github.com/fogrye/graphqlite-bundle . Not sure whats the best way forward here, maybe merge your changes and create a release (7.1) and pin graphqlite-bundle on graphqlite 7.1 with adjustments to code so that it doesn't reference those constants anymore, then only we can test it, @fogrye wdyt? or maybe there is a better alternative. For now we solved it for our project by using a different implementation of Finder which just looks up src directory of our project fogrye/graphqlite-bundle@master...QbilSoftware:graphqlite-bundle:master |
I finally have time to come back and look at this issue. Initially motivation for ComposerFinder was to let graphiqlite discover classes which are outside the
I'll try to implement those and push my PR to graphqlite-bundle |
This issue should be resolved by #698. Please feel free to reopen, should there be any continued performance issues. |
PR #664 causes huge performance regressions,
earlier the class list was cached (using apcu or php files adapter), it isn't anymore. I initially thought it was due to the changes in symfony-bundle (thecodingmachine/graphqlite-bundle#203 (comment)) but apparently the problem lies within the main repo.See the difference here
Before (with graphqlite using thecodingmachine/class-explorer)
After (with latest graphqlite)
As you can see, earlier it was a 1 or 2 seconds for each request (see the main request and the ajax requests), now it is at least 45 seconds for each request.
I profiled it with xdebug and the regression comes from ComposerFinder (the second column shows time in seconds)
The text was updated successfully, but these errors were encountered: