Repository navigation
Conversation
The compiler pass made a new ComposerFinder for each controllers and types namespace. Each one walks every PSR-4 directory of the root namespace, so the same files were walked once per configured namespace.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GraphQLiteCompilerPass::getClassList()made a newComposerFinderfor each configured controllers and types namespace.kcs/class-finderfilters the PSR-4 prefixes by the first part of the namespace only, so each finder walks every PSR-4 directory of the root namespace (for example all ofsrc/). With N namespaces, the same files are walked N times during each container build.This change finds the classes of all namespaces with one finder, then splits them per namespace with the same rule that
kcs/class-finderuses (the class namespace is the namespace or a sub-namespace of it). graphqlite'sSchemaFactorydoes the same: one finder for all namespaces.Measured on a Symfony app with 6 namespaces (3 controllers, 3 types) and about 30,000 classes in an optimized class map:
The public services and the dumped schema are the same before and after. With alekitto/class-finder#28 as well, the build takes 4.6 s.
Tests and PHPStan pass.