Skip to content

Add reusable item virtualization and recycling foundation - #201

Merged
ProGraMajster merged 1 commit into
masterfrom
feature/issue-55-virtualization-foundation
Oct 11, 2026
Merged

ProGraMajster merged 1 commit into
masterfrom
feature/issue-55-virtualization-foundation

Conversation

@ProGraMajster

@ProGraMajster ProGraMajster commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Add the shared virtualization foundation needed before #55 control integration and #13 collection controls. Indexed layouts plan a viewport/cache range without enumerating logical values; the typed generator realizes that range and recycles containers with explicit ownership. Parent #55 remains open for #200.

Architecture

VirtualizingLayout extends the existing LayoutEngine through IVirtualizingLayoutHost. Vertical/horizontal stack and fixed-cell wrap geometry use logical pixels. A measured prefix tree supports variable stack extents and unrealized-item offsets. ItemIndexChange maps occurrences through indexed source mutations, keeping equal values distinct.

Public API

Ten additive types in ModernFormsNext.Virtualization: range/context, layout/host contracts, stack/wrap strategies, metrics, occurrence mapping, and generic generator/factory. Existing APIs are preserved. XML documentation and docs/virtualization.md explain usage, limits and ownership. SDK ApiCompat against exact starting master passes for Debug/Release and both core TFMs, with parameter-name/attribute rules, no suppressions, and fully resolved references.

Lifecycle/threading

Use the host owning thread and existing Control/dispatcher/focus/binding checks. The generator borrows its factory/source, coalesces reentrant range requests, queues mutations in order, and prevents older callbacks from overwriting newer state. Callback disposal is deferred until callback return; fault cleanup attempts every owned container and propagates errors. No finalizer or separate dispatcher is introduced.

Platform behavior

The implementation is shared and introduces no platform-native types. Geometry uses finite logical coordinates; overflowing extents/far edges throw. No backend changes, new dependencies, package version changes or publication.

Designer

These strategy/metadata constructors start no native host. Control property persistence, bounded previews and code-generation acceptance remain required by #200.

Tests

  • Solution restore and serial Debug/Release builds: pass, 0 warnings/errors.
  • Targeted virtualization: 58/58; 100k+ geometry, 10k scroll/jump passes, bounded pools, warmed zero-allocation assertions, variable measurements, indexed mutations, reentrancy/disposal/failures.
  • Full Debug: 4421/4421, 0 skipped across nine projects in the full-context comparison after investigation.
  • Full Release: 4421/4421, 0 skipped across nine projects.
  • Exact starting master full Debug: 4363/4363.
  • Documentation source gate and diff checks: pass. Post-commit DocFX metadata/HTML: 0 warnings/errors; all four local documentation/API/sample/SDK archives validated for commit 9f86cec (existing version, no publication).
  • Existing-version core NuGet inspection: DLL hashes match qualified Release outputs for net10.0/net10.0-windows7.0; XML includes all ten new types.

Native validation

Existing Windows native suites run in full validation. This child establishes engine behavior; rendered virtualization, selection/focus/accessibility, Android emulator/physical-device and Designer control integration are required by #200. No new virtualized UI/native performance claim is made here.

Known limitations

Fixed-cell wrap explicitly rejects variable metrics. Metrics retain numeric metadata proportional to logical count; reset is O(count). Hosts own scroll anchors, logical selection/focus and existing integer-scrollbar limits. Async/infinite-source contracts are not implemented.

Two original Debug native failures are preserved in local evidence: a Designer host WS_VISIBLE assertion and modal owner-input release. Neither was reproduced in ten predetermined alternating exact-base/feature trials for each test. The append-only PID log permits an old FORM_SHOWN marker to satisfy the Designer wait; this synchronization hazard is documented as unresolved. No assertions, timeouts, native flags or thresholds were changed. Successful subsequent checks do not mean these failures were fixed.

Issue linking

Fixes #199.
Part of #55. Integration continues in #200 after this PR merges; #55 remains open.

@ProGraMajster
ProGraMajster merged commit d360157 into master Oct 11, 2026
1 check passed
@ProGraMajster
ProGraMajster deleted the feature/issue-55-virtualization-foundation branch October 11, 2026 15:04
@github-project-automation github-project-automation Bot moved this from Backlog to Done in ModernFormsNext Roadmap Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Implement reusable virtualization contracts and container recycling

1 participant