Ethan Green
Ethan Green
Removes two entries from the `prefetch_related()` on `BasePackageListAPIView`: `package__versions` and `package__package_ratings`. Stops the endpoint from grabbing every package's versions and ratings (like thousands of rows) that the serializer never reads.
Builds dependencies from through-table lookups instead of per-dep ORM models. About a 10x speedup from my local benchmarks. As a side effect this causes dependency lists to be emitted in...
`get_custom_package_listing` now counts a package's dependants with `get_package_dependants_list`, the `@cache_function_result` helper that `Package` already uses, instead of the uncached `get_package_dependants(...).count()`. Drops a correlated `Exists` subquery over the package-version table from...
benched on my local prod reproduction: 52,000 listings, ~450k versions, ~10.9M dependency edges ### Per 1000-listing chunk | metric | before (ORM) | after (SQL) | delta | | ---...
Removes two `annotate()` calls from `get_package_queryset` in the experimental package API: `_total_downloads` (a `Sum`) and `_rating_score` (a `Count`), whose results `PackageSerializerExperimental` hardcodes to `-1` and never reads. Cuts a fan-out...
Community download counts were previously performed as an iterative sum over all active listings. One aggregate query per community per hour. This fixes that by replacing it with a DB-level...
This feature is opt-in and controllable by the attestAi field in the community schema entry. This creates a ai-generated category in the enrolled community automatically. This mirrors the verbiage of...