Files
jobtrackingapp/docs/performance/PERF-07_APPLICATION_CORRESPONDENCE.md
T
2026-11-19 20:47:46 +01:00

3.6 KiB

PERF-07 · Page-scoped application correspondence

Base 327d99dfdacc16f72e008807ea3f27805cf0c570 on codex/a3-ui-10. The ordinary applications table fetched the latest correspondence group for every owned application before paging. It now queries the existing latest-message aggregate once for the current page IDs. The normal board and empty page skip that unused aggregate. Follow-up and readiness filters still evaluate their existing full candidate set before paging to preserve membership and totals.

The focused SQLite test records and replays the actual SQL aggregate. Each fixture contains one correspondence group per owned application, one foreign application with correspondence, and a 15-row second page. The old runtime returned 250 and 2,500 aggregate rows. The new runtime returns exactly the 15 groups belonging to the page in both fixtures. The ordinary board and empty page now issue zero correspondence aggregate commands. The existing tenant filter, ordering, latest-message logic and response shapes are unchanged.

Owned applications Before aggregate rows After aggregate rows
250 250 15
2,500 2,500 15

PASSED 36 selected Release tests with pinned SDK 9.0.317 and no restore. 18 JobQueryParity, 10 ApplicationCalendar, five RulesEngineProspect and three OwnershipGuard cases. The 16 existing parity cases cover ordering, filters, board, ownership and pagination. Two expected pre-fix failures are preserved. Native red and final test logs

These counts measure rows returned by the aggregate under a disposable SQLite fixture. MariaDB plan/rows examined, API response time and production performance remain unmeasured. No index, migration or worker configuration changed.

Filtered readiness and follow-up views

On 19 November the same SQLite regression fixture exposed a separate account-wide read in the derived-filter path. With a Bergen location filter, the old latest-message aggregate returned all 250 or 2,500 owned groups. Only five or 50 applications respectively were candidates for the readiness evaluation. The controller now limits the correspondence aggregate to the existing SQL candidate query before evaluating readiness or follow-up and paging. It uses a database subquery so the application need not send an unbounded list of IDs.

Owned jobs with correspondence Aggregate rows before Aggregate rows after Matching jobs on first page
250 250 5 5
2,500 2,500 50 15

The test records and replays the actual EF-generated aggregate and compares its IDs with the fixture. Both new assertions failed on baseline 2a212c78. The ordinary table still returned 15 page-scoped groups and the ordinary board and empty page issued no aggregate. The 38-test affected Release run passed, including table/board parity, ownership and workflow signals. The local native test receipt had SHA-256 f84ca67a361dbcbca83ae762a02a5a90526a78d0e4ee8a3e1098773f0d29987b.

Run the pinned .NET 9.0.317 SDK against JobTrackerApi.Tests/JobTrackerApi.Tests.csproj with --no-restore -c Release and the filter below.

FullyQualifiedName~JobQueryParityTests|FullyQualifiedName~ApplicationCalendar|FullyQualifiedName~RulesEngineProspect|FullyQualifiedName~OwnershipGuard|FullyQualifiedName~JobApplicationsWorkflowSignalsTests

The measurements establish returned aggregate rows on these fixtures. Runtime on MariaDB, query plans for unselective searches and end-to-end latency remain open. The rollback unit is the filtered correspondence query change in ReadJobsAsync.