Skip to content

SSOT v2 Phase 3 — prioritize realized Explorer/Global Live rows under SG7 backlog - #703

Closed
masarray wants to merge 7 commits into
perf/ssot-v2-reactive-viewport-20261023from
perf/ssot-v2-realized-viewport-priority-20261023
Closed

masarray wants to merge 7 commits into
perf/ssot-v2-reactive-viewport-20261023from
perf/ssot-v2-realized-viewport-priority-20261023

Conversation

@masarray

Copy link
Copy Markdown
Owner

Scope: high-rate UI scheduling, not communication logic

Stacked on #698 exact HEAD f6465df9 (already includes latest SSOT Phase 1, Smart IP improvements and P0 Browser reactive projection). Dedicated narrow performance branch; no staging/main merge.

Problem: Existing UI point flush is coalesced and bounded, but selection only pre-prioritized the first 48 model rows, even when Explorer/Global DataGrid viewport was scrolled to a different part of 32.9k points. A visible row could wait behind a full FIFO of unrelated offscreen signals.

Implemented:

  • LivePointViewportPriorityTracker tracks exact IEC point queue keys for actually realized DataGrid rows, independently for Explorer and Global Live Monitor. Only keys, NO duplicate observation store or WPF row references. Concurrent ingress checks safe.
  • Hook DataGrid.LoadingRow/UnloadingRow/unload on both existing virtualized grids, installed before first layout. When newly visible rows are already pending, lift only those keys to priority, without scanning 25k values or resetting ItemsSource.
  • On ingress, newly queued snapshots for realized rows are prioritized immediately while every key remains in ordinary FIFO. Fair work scheduler reserves each fourth accepted point slot for FIFO under visible Report storms, keeping other IEDs progressing. Existing ~8-ms and 192 point budget per 200-ms UI tick retained.
  • Cache device-owner lookup on WPF thread and invalidate on observable device inventory edits, with fallback if project DeviceId changes in place; avoids allocating GroupBy/ToDictionary on every frame.
  • New deterministic tests for 32,900 keys and random viewport jump, same exact key realized by two grids, cross-thread hint lookup, and source-contract preserving canonical/association/SOE invariants.

Parallel branches: #693 MMS Command/Write is merged into its FAT parent (not an ancestor of this branch); #696 Smart IP PR is closed but its final independent changes require a later integration review. Existing #698 HEAD already carries Smart IP window edits committed separately. No changes to IP wizard, command or control dialogs, Browser typed write/admission, MMS/native engine, GOOSE, SOE or IEC acquisition. Only six files, none touch teams' principal command/IP implementation files. No merge to their staging branches until measured three-way integration and fresh exact-SHA Windows CI.

Release gates: DRAFT/unmerged. Physical SG7 four-IED p95/p99 interaction and scroll/GC/Report/SOE/command FAT still required. CI proves regression safety, not physical zero-freeze.

Copy link
Copy Markdown
Owner Author

Verified Phase 3 checkpoint — reactive realized-row scheduling (2026-10-23)

Exact final HEAD: a3f3960959c381b5b589b7576e6946a51db9f136 — 5/5 triggered GitHub workflows SUCCESS on this revision:

  • Windows Build ARSAS: full solution, managed app tests, pinned ARIEC and ArdIrec native bridge verification, direct portable EXE, packaging smoke/seal, test evidence SUCCESS.
  • SCL R7 Interoperability: 2,720/2,720 ARSAS tests PASS, 1,182/1,182 engine tests PASS, 0 failed, 0 compile errors, R7 portable and smoke SUCCESS.
  • SV evidence bundles SUCCESS.
  • IEC 61850 interoperability reference guard SUCCESS.
  • CI P1 Advisory SUCCESS.
  • Controlled Windows 1.6.40 portable artifact (field candidate only; NOT promoted public release).

Diff limited to six files versus current #698 HEAD f6465df9 (GitHub compares ahead 7, behind 0):
MainWindow.xaml.cs, MainWindow.IecNaturalSort.cs, two new non-protocol components MainWindow.LivePointViewportPriority.cs and Models/LivePointViewportPriorityTracker.cs, plus two tests.

Why this matters for SG7: Previously 48 first model rows received priority irrespective of the scrolled/filtered viewport. Now WPF's actual recycled DataGrid.LoadingRow/UnloadingRow events register only currently realized Explorer and Global Live point keys (FC-qualified), and a concurrent ingress lookup promotes truly displayed pending keys. The original FIFO always carries every key; every 4th accepted slot preferentially serves regular FIFO to prevent starvation; existing 192-point/~8ms point UI budget, canonical SSOT projection, association fencing, q/t/RCB evidence and separately FIFO SOE remain unchanged. Cached UI device-owner map avoids fresh LINQ GroupBy/ToDictionary every 200ms, with safe collection invalidation and project DeviceId rebind retry. Initial viewport events hooked before first WPF layout. 32,900-row stress hints + two-grid/parallel regression tests included.

Concurrent teams / integration facts:

Not proven: Real device 4-IED p95/p99 click-to-paint/scroll, Dispatcher stall duration, CPU/GC, SOE/RCB/Write field behavior. CI regression passing is NOT proof physical UI freeze has vanished.

Copy link
Copy Markdown
Owner Author

Administrative consolidation — superseded by the integrated RC, not GitHub-merged through this historical PR. The exact PR head is verified as an ancestor of RC 3abde5fb34ed915a32ec60a4bacdf682ab1bddbf (GitHub commit comparison: 0 commits behind). Therefore no separate merge is needed; merging this stacked PR now would duplicate/rebase historical changes against the wrong base. Preserve this immutable review/provenance record. Final RC authority lives in #729; newest five-IED operator FAT source evidence in #740. Closing obsolete staging PR does not approve public stable; R7/R10/SOE gates remain open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant