perf: skip tag lookups for tables with no tag assignments (forward-port of #67) #68

Merged
james.maes merged 2 commits from fix/read-path-statements-develop into develop 2026-11-10 22:11:03 +00:00
Owner

Forward-port of PR 67, which went to release/1.2 and published 1.2.0-RC.3. The same two commits, cherry-picked cleanly onto develop, so the next line cut from develop keeps the fix: no tag-assignment lookup for tables with no tags (per-node cluster cache, 30 s, invalidated on write), and each distinct parent authorized once per child result page.

🤖 Generated with Claude Code

Forward-port of PR 67, which went to release/1.2 and published 1.2.0-RC.3. The same two commits, cherry-picked cleanly onto develop, so the next line cut from develop keeps the fix: no tag-assignment lookup for tables with no tags (per-node cluster cache, 30 s, invalidated on write), and each distinct parent authorized once per child result page. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
james.maes added 2 commits 2026-11-10 21:58:24 +00:00
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>
perf(security): authorize each distinct parent once per child result page
maven / build (push) Successful in 7m15s
build / maven (push) Successful in 7m15s
04d04adc6e
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>
james.maes merged commit 16bd4f768f into develop 2026-11-10 22:11:03 +00:00
Sign in to join this conversation.