You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reduce repeated type checks during schema reconstruction #300
Rebuilding a large schema repeatedly calls type-check helpers for references already collected.
The repository's GitHub schema recreation benchmark takes 1.310 ms per call in my measurements.
A small change to TypeSet.collect_referenced_types uses direct class checks and skips repeated work.
It preserves type order, lazy lookups, and errors.
Situation
Before
With proposed change
Change
Recreate the GitHub schema
1.310 ms
0.903 ms
31.0% less time
Build a schema from introspection
14.959 ms
14.713 ms
1.6% less time
Execute an async iterable list field
1.212 ms
1.199 ms
1.1% less time
Decode a pickled large-query AST
6.955 ms
6.957 ms
No measurable change
These are median times on the same isolated CPU, using CPython 3.12.13 and Linux x86-64.
The source is graphql-core 3.3.1 at commit 0aaea717d8a6ca4e7241fb798ff4f0216dde61ee.
The native suite passes with the change: 3,625 passed and 18 skipped.
AI assistance: Codex gpt-6.1-sol generated the candidate, and Weco Observe recorded its measurements.
I have a tested patch ready and would be glad to open a pull request if this approach fits the project.
changed the title [-]# Reduce repeated type checks during schema reconstruction[/-][+]Reduce repeated type checks during schema reconstruction[/+]on Nov 7, 2026
Activity
Cito commentedon Nov 6, 2026
Done in #301, part of 3.3.2.
[-]# Reduce repeated type checks during schema reconstruction[/-][+]Reduce repeated type checks during schema reconstruction[/+]