8000 Fix N+1 recipient user fetches by mwoods79 · Pull Request #139 · huddlz-hq/huddlz · GitHub
[go: up one dir, main page]

Skip to content

Fix N+1 recipient user fetches - #139

Merged
mwoods79 merged 2 commits into
mainfrom
codex/issue-138-batch-recipient-fetches
May 1, 2026
Merged

mwoods79 merged 2 commits into
mainfrom
codex/issue-138-batch-recipient-fetches

Conversation

@mwoods79
@mwoods79 mwoods79 commented May 1, 2026
Copy link
Copy Markdown
Contributor

Summary

  • Batch user lookup in RecipientHelpers.deliver_each/3 with a single Ash read
  • Keep missing/stale recipient IDs skipped by only delivering to returned users
  • Avoid querying users for empty recipient lists

Closes #138

Tests

  • mix format lib/huddlz/communities/huddl/changes/recipient_helpers.ex
  • mix test test/huddlz/notifications/huddl_lifecycle_notifications_test.exs test/huddlz/notifications/rsvp_notifications_test.exs test/huddlz/notifications/group_membership_notifications_test.exs

@mwoods79
mwoods79 merged commit 35fe704 into main May 1, 2026
1 check passed
@mwoods79
mwoods79 deleted the codex/issue-138-batch-recipient-fetches branch May 1, 2026 02:59
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.

Batch user fetches in RecipientHelpers.deliver_each (N+1)

1 participant

0