strawberry-graphql/strawberry-django

Slow startup when defining many filters

オープン

#519 opened on 2024/04/18

 (5 件のコメント) (3 件のリアクション) (0 人の担当者)Python (152 件のフォーク)auto 404
enhancementhelp wantedquestion

Repository metrics

Stars
 (496 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド