perf: skip tag lookups for tables with no tag assignments #67

Merged
james.maes merged 2 commits from fix/read-path-statements-1.2 into release/1.2 2026-11-10 21:39:10 +00:00
2 Commits
Author SHA1 Message Date
james.maesandClaude Fable 5.2 b9137b3379 perf(security): authorize each distinct parent once per child result page
maven / build (push) Successful in 6m40s
build / maven (push) Successful in 6m40s
ParentRowCustomizer and AttachmentPreviewCustomizer read the parent of
every child row to decide whether the row is visible, so rows that share a
parent repeated the same read: 61 tasks on two parents ran 61 parent reads
(TagLookupStatementBudgetTest), now 2. The answer is kept only for the one
postQuery call, where the session and transaction cannot change.

Also correct the README: the Tags field is selectable.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 15:24:58 -06:00
james.maesandClaude Fable 5.2 50226fbabc perf(tags): no assignment lookup for tables that have no tags
maven / build (push) Successful in 7m38s
build / maven (push) Successful in 7m38s
Core selects the Tags virtual field for every query or get that names no
fields, so every such read of a TAGS-enabled table ran one
collaboration_record_tag statement, including reads made one record at a
time and tables that were never tagged. Measured with 600 added parents
(TagLookupStatementBudgetTest): a 602-row list ran 2 statements, 600 gets
ran 600 and 100 single-record updates ran 100; now 1 probe, then 0.

TaggedTables remembers, per node and per table, whether any assignment
exists (core Memoization registered with ClusterCaches, 30 s by default,
withTagLookupCacheSeconds, 0 disables). Writing an assignment clears it at
once and after commit and publishes memo-invalidate. The probe ignores row
locks and returns no data, so the answer is the same for every session.
Tables with assignments are read as before: one lookup per 500 parents.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 15:22:19 -06:00