hypothesis / lms

LTI app for integrating with learning management systems
BSD 2-Clause "Simplified" License
46 stars 14 forks source link

Reduce batch size for H's groups bulk API call #6833

Closed marcospri closed 3 weeks ago

marcospri commented 3 weeks ago

We keep seeing calls to this endpoint taking over 10s. The main culprit is the query the endpoint makes to get which groups have annotations. Reducing the number of groups we query per API calls should bring the API time down.

We can see the current total number of groups in this paper trail query.

https://my.papertrailapp.com/groups/14104911/events?focus=1789133066271342592&q=Generating+report+for

It seems like we have a few organizations with a few thousands of groups which should translate to one API call per 1000 groups now and calls for 250 groups after merging this.