perf(gmail): narrow review-decision lookup to the single ThreadId #17

Merged
cesnimda merged 1 commits from fix/gmail-review-decision-load-all into main 2026-07-11 20:42:19 +02:00
Owner

Backlog item 2. CreateSuggestedJob/RelinkThread/UnlinkThread each loaded every GmailReviewDecision for the owner to upsert one by ThreadId. Narrowed to FirstOrDefaultAsync(OwnerUserId, ThreadId). 169/169 green.

Backlog item 2. CreateSuggestedJob/RelinkThread/UnlinkThread each loaded every GmailReviewDecision for the owner to upsert one by ThreadId. Narrowed to FirstOrDefaultAsync(OwnerUserId, ThreadId). 169/169 green.
cesnimda added 1 commit 2026-07-11 20:38:57 +02:00
perf(gmail): narrow review-decision lookup to the single ThreadId
CI and Deploy / test (pull_request) Successful in 2m5s
CI and Deploy / deploy (pull_request) Has been skipped
6a43227315
Backlog item 2. CreateSuggestedJob, RelinkThread, and UnlinkThread each
upserted exactly one GmailReviewDecision by ThreadId but loaded every review
decision for the owner (GmailReviewDecisions.Where(OwnerUserId == x).ToList())
just to linear-scan for the one match. Replaced with FirstOrDefaultAsync
filtered on both OwnerUserId and ThreadId, and added a single-row
UpsertReviewDecision overload alongside the existing dictionary-based one
(still used by the review-queue endpoints, which genuinely need every
decision at once to render the queue).

169/169 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cesnimda merged commit abe23b799a into main 2026-07-11 20:42:19 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cesnimda/jobtrackingapp#17