strawberry-graphql/strawberry-django

Slow startup when defining many filters

Aberta

#519 aberto em 18 de abr. de 2024

 (5 comentários) (3 reações) (0 responsável)Python (152 forks)auto 404
enhancementhelp wantedquestion

Métricas do repositório

Stars
 (496 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Startup time for the app increases linearly as more filters and annotated types are added.

Describe the Bug

We have converted NetBox from graphene to Strawberry - one things we noticed is a large jump in startup times, tracing this down it was from Strawberry processing all the filters and annotated types (we have a lot defined). When using graphene there was no noticeable delay in startup time.

timing to create the schmea without the filterset annotations: 219.61 ms timing with the annotations: 4568.14 ms

The startup delay is fairly linear as you add more and more filter fields. Unfortunately it is difficult to provide an example project as it is only noticeable when you have a large number defined.

Guia do colaborador