Addons: improve serializer performance (#12335)
- Instead of passing the version slug to the project serializer, just
pass the actual version, so we can use resolve_version, this reduces one
less query.
- We were passing the resolver around some places, but doing this weird
thing where removing it from kwargs, and then adding it again. This
introduced a bug that was creating a new resolver for each serializer
instance instead of re-using the one passed to the initializer.
This took ~10ms off locally
<img width="1550" height="237" alt="Screenshot 2025-07-17 at 16-04-42
Silky - Profiling -"
src="https://github.com/user-attachments/assets/5667e02c-fe74-4583-b2db-43a086c994b5"
/>
Note: I'm running these benchmarks in power saver mode, otherwise my
computer is too fast and can't get meaningful comparisons :D