-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Each API field definition is lazy loaded #10525
Previously, we lazy-loaded the whole group of fields of QueryType and MutationType at once. But each field were not lazy-loaded individually. So a query with a single field, still loaded the schema for all possible queries. Same for mutations. Now we enforce lazy-loaded individual fields via PhpStan extra typing. The measured speed improvement is actually extremely small, and possibly even non-existent (!), even for our largest projects. Something like 1.01 ± 0.09 times faster than before. But we still keep it, because the work is already done, and it gives other minor advantages, such as: - less indented code - easier access to specific mutation via name instead of numerical index - _maybe_ less memory usage (though I didn't measure it)
- Loading branch information
Showing
4 changed files
with
102 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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