perf(grpc-data): #1105 a queued cohort frame rides the channel as a struct, not a FrameEvent record
Release, 10k cohort: ~1.69 KB -> 1.65-1.67 KB per delivered value process-wide; queue section 40 B -> 0 B per value. - ProjectedDataAccess's cohort channel carries a CohortMessage struct (control Event, or frame + charge + received timestamp); control events convert implicitly, so every writer is unchanged. Slot release, charge and dispose obligations on the read, drain and finally paths are unchanged. - GrpcDataWave3PerfTests asserts queue 0 B/value, build < 192 B/value and (Release) < 1.8 KB/value process-wide. Declined (documented in docs/DataConnections.md): ProjectedValueUpdate+DataValueSnapshot (public publish API, retained by the publisher), the one-element publish list (reuse needs an ownership promise IProjectedValuePublisher does not make), origin frame records (public Core.Abstractions contract; the frame is owned by the reader), CachedSourceRead (public, escapes, identity-based once-only guards).
This commit is contained in:
@@ -353,6 +353,26 @@ Follow-ups (#1098):
|
||||
B, 21-48 B unattributed. The harness's hub samples carry a different serving than the items, so its tick still pays the 96 B re-stamp. Where they
|
||||
match, a value reuses the read's sample object outright.
|
||||
|
||||
Follow-ups (#1105):
|
||||
|
||||
- **A queued frame is no longer wrapped.** The cohort's event channel carries a `CohortMessage` struct (a control event or a
|
||||
frame with its charge and receive timestamp) instead of a `FrameEvent` record per frame. The channel's circular segment holds
|
||||
it, so queueing a frame allocates nothing (queue section 40 B to 0 B per value; one frame per value under a live publish).
|
||||
Slot release, charge and dispose obligations are unchanged. Release, 10k cohort: about 1.69 KB to 1.65-1.67 KB per value
|
||||
process-wide. `GrpcDataWave3PerfTests` now asserts the queue section is 0 B, the build section is under 192 B, and (Release)
|
||||
the process-wide figure is under 1.8 KB.
|
||||
- **Not done, and why.** Each remaining fixed record either leaves the session or is public contract:
|
||||
- `ProjectedValueUpdate` + `DataValueSnapshot` (184 B, the build section): both are public records on the publish API
|
||||
(`IProjectedValuePublisher`), and `DataValueSnapshot` is the driver-wide value type. Folding one into the other, or making
|
||||
either a struct, breaks that API, and the publisher keeps the update after the call returns.
|
||||
- The one-element list handed to `TryPublishOrBackpressure` (24 B): reusing a list per cohort would rely on every
|
||||
`IProjectedValuePublisher` copying it before returning. `ActorProjectedValuePublisher` does, but the interface does not
|
||||
say so, so that would be an ownership change.
|
||||
- The origin frame records (`DataSubscriptionValues`, its one-element item list, `DataSubscriptionValue`): public
|
||||
`Core.Abstractions` contract, and the frame (with its `ResourceLease`) is handed to the reader, which owns and disposes it.
|
||||
- The hub read (`CachedSourceRead`): public, escapes into `LocalDataServices`' publication lease and `SnapshotLease`, and its
|
||||
dispose/transfer guards are once-only by object identity. A struct copy would duplicate those guards.
|
||||
|
||||
### Mixed versions (X0 rollout)
|
||||
|
||||
The remote history and alarm work (`docs/plans/2026-11-23-grpc-data-connections-history-alarms-plan.md`)
|
||||
|
||||
Reference in New Issue
Block a user