Slow introspection query execution for large schemas
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- api, performance
Rechercherichtung
Beginne mit graphql_sync und get_introspection_query und vergleiche anschließend deren Ausführungspfad mit dem referenzierten Modul graphql_compiler/fast_introspection.py. Führe die Introspection-Abfrage für ein Schema mit etwa zehntausend Typen erneut aus und profiliere die Ausführung. Als abgeschlossen gilt die Identifizierung und Behebung des maßgeblichen Overheads mit einer gemessenen Verbesserung gegenüber der gemeldeten Laufzeit von 26 Sekunden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
The graphql-core graphql_sync function takes approximately 20x slower than a module that I wrote that solely executes the introspection query. https://github.com/kensho-technologies/graphql-compiler/blob/main/graphql_compiler/fast_introspection.py
With the graphql-core Python library, executing the default introspection query (outputted from get_introspection_query) on a schema of around ten thousand types with graphql_sync takes 26 seconds to run. Writing my own module that calls the same graphql-core Type resolvers executes the same query on the same schema in 1.37 seconds.
I'm not sure what exactly is the time sink with the graphql-core's approach, but it might have to do with the generality of graphql_sync and thus, computing the next field to resolve at every step, and also graphql_sync's recursive nature. Interestingly, I ran the same query on the same schema using Graphql.js, and the execution took less than 2 seconds (around 1.7 seconds).
Thank you for your time and all the work to port GraphQL.js to Python!
- Vorherrschende Sprache
- Python
- Sterne
- 531
- Forks
- 147
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus graphql-python/graphql-core
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 50/100
graphql-python/graphql-core#272 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
graphql-python/graphql-core#269 · 1 Kommentar ·
-
Publish a major version Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
graphql-python/graphql-core#267 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
graphql-python/graphql-core#257 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
graphql-python/graphql-core#247 · 8 Kommentare ·
Alle Issues in graphql-python/graphql-core
Ähnliche Issues
-
agent-ready documentation needs-triage
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
instance instance add
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
searxng/searx-instances#939 · 1 Kommentar ·
-
area-deployment area-integrations triage:bot-seen
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 86/100