readthedocs.org
6d0eb9e2 - Search: optimize queryset when searching for subprojects with organizations (#12635)

Commit
6 days ago
Search: optimize queryset when searching for subprojects with organizations (#12635) On .com having organizations introduces some extra queries. Since all subprojects share the same organization as the parent project, we can cache that organization, so it's shared across all subprojects. This also allows caching the .organization property, and skips querying organizations if we are on .org. Results: - One less query for searches on projects with organizations - When searching across subprojects, two queries for each subproject (constant). It used to add 4 queries for each subproject. I had to move tests to .com, so they are more accurate with production, as in .com we do several overrides.
Author
Parents
Loading