Skip to content

Fix n+1 on mailing list#1632

Merged
jb3 merged 1 commit into
mainfrom
mailing-list-n+1-warning
Jul 5, 2026
Merged

Fix n+1 on mailing list#1632
jb3 merged 1 commit into
mainfrom
mailing-list-n+1-warning

Conversation

@ChrisLovering

Copy link
Copy Markdown
Member

.values('hash') bypassed the prefetch_related('seen_items') cache and re-hit the database once per mailing list. Using objects.all() reuses the prefetched results

.values('hash') bypassed the prefetch_related('seen_items') cache and re-hit the database once per mailing list. Using objects.all() reuses the prefetched results
@ChrisLovering ChrisLovering requested review from jb3 and jchristgit July 5, 2026 22:05
@netlify

netlify Bot commented Jul 5, 2026

Copy link
Copy Markdown

Deploy Preview for pydis-static ready!

Name Link
🔨 Latest commit 2f38738
🔍 Latest deploy log https://app.netlify.com/projects/pydis-static/deploys/6a4ad51560d99b00081dc657
😎 Deploy Preview https://deploy-preview-1632--pydis-static.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — mailing-list-n+1-warning into main

@jb3 jb3 merged commit 23e888c into main Jul 5, 2026
11 checks passed
@jb3 jb3 deleted the mailing-list-n+1-warning branch July 5, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants