You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addons: improve performance when versions have downloads (#12360)
- This call for getting the project domain wasn't cached, so it was
creating a new resolver for each download type of each version,
resulting in several queries being done. This was extremely slow on
.com, where the resolver needs to check for the organization
subscription. Now the resolver is shared across all calls.
- The resolver cache was updated to not have a limit, so we can cache
more results per instance.
- When getting the version from a project, we were calling
Versions.objects instead of projects.versions, when using the later, the
project object will be shared across all versions, when using the
former, a new instance will be created for each version, which is slow
and doesn't preserve any cached attributes. We should remove the
`project` option from the version querysets, so we are forced to always
use project.versions (will do that in another PR).
All these improvements resulted in going down from 71 queries for a
project with 10 versions with downloads to just 13, and this number is
constant, if more versions are added, we will always have 13 queries.
0 commit comments