Code review 2026-12-02 WP6: Performance #157
Reference in New Issue
Block a user
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?
From the 2026-12-02 full code review (commits
28b6651a,f7e4f5b4: decisions accepted 2026-12-03).docs/plans/2026-12-02-full-code-review.mddocs/plans/2026-12-02-full-code-review-remediation.md→ WP6Task.Run, flushes chain on a persist-tail task so batches stay ordered, and readsPipeTo(Self).EnforceCapuses a priority structure. Look up the predictor lane in O(1).Cache=Shared. Keyset-pageReadPendingSinceAsyncon an indexed(ForwardState, OccurredAt, EventId). Add an age-seekable purge index. Batch the tracking reads in the telemetry drain.(Channel, OccurredAtUtc)index and bind the channel asvarchar. Add a sitesite_events(instance_id, timestamp)index. Migration + SQL script; site schema applied in place.AsNoTracking. Detach a failed staging write (like P7-5). Re-check Disabled at Send time. Use targeted single-entity loads.$refschemas per method revision. Size the audit buffer to Content-Length (capped). Expire the relay replay cache by time-ordered queue.Each task needs a micro-benchmark or a query plan (
EXPLAIN QUERY PLAN, orsqlcmd -Iwith SET STATISTICS IO) before and after. Record the numbers in the commit message.Fixed on
main(pushed,922021c4). Plan:docs/plans/2026-12-02-full-code-review-remediation.md(see its Outcome section).All 10 tasks landed. Before/after numbers are in each commit message, for example:
Partial:
Both are tracked in #159.
Migration:
AuditLogChannelOccurredIndex. Site SQLite indexes are applied in place at boot.Behaviour change: a shared-schema library edit now reaches running inbound methods within the method-cache TTL (5 s), not instantly.
Commits:
9a574746feat(config-db): migration AuditLogChannelOccurredIndex — partition-aligned IX_AuditLog_Channel_Occurred (AUD-5, WP6 task 6.5)b3fba593test(management): stub the analysis closure SetAlarmOverride now reads (TPL-4, WP6 task 6.6)790db4ffperf(communication,dcl): bounded-parallel failback probes; allocation-free MxGateway quality map (COMM-8, DCL-10, WP6 task 6.10)2ef2d751perf(inbound-api): cached schema library snapshot, Content-Length-sized audit buffer, time-based replay prune (INB-2, INB-3, INB-4, WP6 task 6.9)c5cd2807perf(central-ui): save only changed overrides in one transaction; authorise once per action; split Test Run deadline (UI-6, UI-12, UI-13, WP6 task 6.8)8966c545perf(transport,management): bundle export resolves names from projections; import memoises name and connection lookups (MGT-5, TRN-11, WP6 task 6.7)59817f50perf(deployment,template-engine): batched untracked staleness loads, staging-failure detach, lock-held Disabled re-check, targeted single-entity loads (DEP-4, DEP-5, DEP-6, TPL-4, WP6 task 6.6)04e39690perf(audit-log,site-event-log): channel+age purge index with varchar binding; instance+timestamp event index (AUD-5, SEL-1, WP6 task 6.5)9f03726fperf(audit-log): private-cache connections, owed-range pull index, age-seekable purge, batched tracking reads (AUD-2, AUD-3, AUD-4, AUD-7, WP6 task 6.4)54416e33perf(store-and-forward): rank sweep lanes over a covering narrow index, join payloads for the page only (SF-3, WP6 task 6.3)d3c62956perf(site-runtime): route expression triggers by referenced keys; heap cap eviction; O(1) predictor lane (SRT-7, SRT-14, CMN-11, WP6 task 6.2)8b64d1ecfix(site-runtime): move synchronous SQLite work off the Akka dispatcher (SRT-5, WP6 task 6.1)Deploying to QA and DEV is tracked in #160. Closing.