Phone numbers and web links: primary_for ignores rows already prefetched, so a sync pays two queries per contact #1171
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#1171
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
postulo-dav computes a digest of every contact on every run, and each one costs two queries for the primary phone number and the primary web link, because
phone_numbers.primary_forandweb_links.primary_forquery even when the holder's rows were prefetched.What would change
Both functions read the holder's prefetched rows when
phone_numbersorweb_linksis in its_prefetched_objects_cache, and query as today otherwise. Same answer, no new surface name. A test asserts zero queries for a prefetched holder. postulo-dav then adds the prefetch to its contacts query.Accessibility
None.
The whole finding, with its measurements and decisions, is postulo/postulo-dav#47.
Found by the efficiency and reliability audit of 2026-10-30 (finding PR7; index postulo/postulo#1108). Checked against
mainatdaee30b15(2026-10-30).