Skip to content

API: /groups/:name query very slow for groups with many projects

Summary

API: /groups/:name query very slow for groups with many projects

Steps to reproduce

curl https://salsa.debian.org/api/v4/groups/science-team

takes ~40s. I suspect this is as it is a group with a very large number of projects (910 at the time of writing).

What is the current bug behavior?

The query takes 40s to return a result.

What is the expected correct behavior?

It should be faster.

Possible fixes

I suspect gathering the project information makes this query slow. Groups with several hundred projects are probably fairly uncommon, but Debian has several of them for packaging teams.

Possible fixes include:

  • Implement an option to not return project details, but only group information. (I only wanted to get the group id from the name. No project details needed for this.)
  • Make the query faster.

Ideally both would be implemented as expensive, unauthenticated queries could be used for denial of service.