getsentry / getsentry/sentry-python

StrawberryIntegration slows down query performance dramatically

未關閉
#3,670 19 則留言 0 個 reaction 已指派 1 人 已被 @sentrivana 認領 在 GitHub 檢視
Better Async Support Improvement Integration: Django Integration: Strawberry Python
主要語言
Python
星號
2.2k
分支
669
平均合併
1 天 40 分鐘
30 天內合併 PR
212

描述

### How do you use Sentry?

Sentry Saas (sentry.io)

### Version

2.17.0

### Steps to Reproduce

1. Set up a Django project with Strawberry async.
2. Set up a query for an endpoint that returns many objects. I tested with 2,000 objects and only 2 fields for each - an ID and a string, e.g.

```python
@strawberry_django.type(models.Item, fields=["id", "value"], pagination=True)
class Item:
pass

@strawberry.type
class Query:
items: list[types.Item] = strawberry_django.field()
```

```graphql
query Items {
items(pagination: { limit: 2000 }) {
id
value
}
}
```

### Expected Result

Not much performance difference with or without `StrawberryIntegration`

### Actual Result

With `StrawberryIntegration`, this took 3-4x longer. In my case, about 800ms. Without it, I got the results back in 200-250ms.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。