Commit c4678e8
committed
# This is a combination of 9 commits.
# This is the 1st commit message:
feat(render): expand DataTree render scenarios and persist benchmark timings
standardize DataTree test data with predictable field naming across scenarios
add per-scenario timing capture and write results to datatree-timings.json
add Newtonsoft.Json to DetailControlsTests for timing serialization
add render-testing skill documentation for baseline and benchmark workflow
remove obsolete generated Build/FieldWorks.targets.bad file
update checked-in test result artifact for current render test run
fix: resolve build blocker + timing test layout gaps
- Remove duplicate Kernel project entry in FieldWorks.sln that blocked
NuGet restore (first entry was missing EndProject)
- Add CitationForm and Senses parts to test Normal layout so timing
tests produce real slices instead of 0
- Add LexSense-Detail-Senses part and subsense recursion to GlossSn
layout so WorkloadGrowsWithComplexity test correctly validates
that deeper scenarios produce more slices
- Include user edits to implementation-paths.md
OS-3: All 4 DataTreeTiming tests now pass
perf: add render-testing workflow + timing enhancement log
- Update render-testing skill with explicit devil's advocate stage, retest/review, and mandatory TIMING_ENHANCEMENTS.md before commit.
- Refine DataTree tab-index optimization safety by moving final ResetTabIndices(0) to CreateSlices finally.
- Keep DeepSuspendLayout/DeepResumeLayout batching in DummyObjectSlice.BecomeReal.
- Mark OS-3 and OS-5 complete in OpenSpec tasks and add TIMING_ENHANCEMENTS.md with measured outcomes.
Validation: build.ps1 -BuildTests; test.ps1 -TestFilter DataTreeTiming -NoBuild
perf: paint pipeline optimization — clip-rect culling + double-buffering
- HandlePaintLinesBetweenSlices: skip separator lines outside paint clip rect,
reducing per-paint iteration from O(N) to O(visible) during scroll/partial
repaints. Avoids O(N) XML attribute parsing on off-screen slices.
- DataTree constructor: enable OptimizedDoubleBuffer + AllPaintingInWmPaint
to eliminate flicker during paint.
- Add DataTreeTiming_PaintPerformance test for paint-time regression detection.
- Update render-testing skill with test coverage assessment step.
- Update TIMING_ENHANCEMENTS.md with enhancements 3 and 4.
perf: layout path optimization — early-exit guard, construction skip, paint-path skip
Enhancement 5: Slice.SetWidthForDataTreeLayout returns early when
m_widthHasBeenSetByDataTree && Width == width, avoiding redundant
splitter resizing and event handler churn on every layout pass.
Enhancement 6: DataTree.OnSizeChanged skips the O(N) splitter
adjustment loop during ConstructingSlices. HandleLayout1(fFull=true)
handles width synchronization after construction completes.
Enhancement 7: HandleLayout1 paint path (fFull=false) skips
SetWidthForDataTreeLayout for non-visible slices, reducing width-sync
work from O(N) to O(K) per paint where K is visible slice count.
Also fixes RemoveDuplicateCustomFields test to match Test.fwlayout
Normal layout changes from prior commit.
perf: XML attribute caching + MakeSliceVisible high-water mark
Enhancement 8: Cache header/skipSpacerLine/sameObject XML attributes
on Slice as lazy bool? fields. Eliminates per-paint XML parsing in
HandlePaintLinesBetweenSlices (~2,700 XML lookups/sec at 60Hz with
15 visible slices reduced to 0 after first access).
Enhancement 9: Change MakeSliceVisible from static to instance method.
Pass known index from HandleLayout1 caller (avoids O(N) IndexOf).
Track m_lastVisibleHighWaterMark so the inner 'make preceding visible'
loop amortizes to O(N) total instead of O(N*V). Preserves the .NET
Framework bug workaround (LT-7307). Reset mark in CreateSlices.
perf: construction-path guards + optimization regression tests
Enhancement 10: Skip ResetTabIndices in RemoveSlice during ConstructingSlices.
Mirror of Enhancement 1 — the finally block in CreateSlices already does a
single ResetTabIndices(0) after all removals/insertions complete.
Enhancement 11: Skip AdjustSliceSplitPosition in InstallSlice during
ConstructingSlices. HandleLayout1(fFull=true) sets correct widths + splitter
positions after construction, making per-insert adjustment redundant.
Added 7 optimization regression tests (DataTreeOpt_ prefix):
- WidthStabilityAfterLayout (Enhancement 5)
- AllViewportSlicesVisible (Enhancement 9)
- XmlCacheConsistency (Enhancement 8)
- XmlCacheInvalidationOnConfigChange (Enhancement 8)
- SequentialPaintsProduceIdenticalOutput (Enhancements 3,4,7,8)
- SlicePositionsMonotonicallyIncreasing (Enhancement 3)
- IsHeaderNodeDelegatesToCachedProperty (Enhancement 8)
All 12 DataTree tests pass (5 timing + 7 optimization).
# This is the commit message #2:
feat: Enhancement 12 — binary search in HandleLayout1 paint path
Add FindFirstPotentiallyVisibleSlice binary search to skip above-viewport
slices during paint-path layout. Addresses JohnT's original TODO in OnPaint.
- HandleLayout1 now starts iteration at the first potentially visible slice
(with -1 safety margin) instead of index 0 on paint-path calls
- Timing improvements: shallow -71%, deep -20%, extreme -7%, paint -11%
- 5 binary-search risk-reduction tests added (DataTreeOpt_ prefix)
- Regenerate snapshot baselines after layout/parts changes from 64ab221
- Add mandatory snapshot regression check (Step 6) to render-testing skill
- Update TIMING_ENHANCEMENTS.md with E12 measurements and devil's advocate
# This is the commit message #3:
The real optimization - HWND virtualization
# This is the commit message #4:
fix: correct VwDrawRootBuffered coordinate mapping + trailing separator bars
Three rendering quality fixes for the snapshot capture pipeline:
1. VwDrawRootBuffered coordinate fix (CompositeViewCapture.cs):
GetCoordRects returns rcDst in rootSite-local coordinates (origin
at HorizMargin, 0). The overlay code was passing clientRect with
the rootSite's position relative to the DataTree (e.g. X=175),
causing VwDrawRootBuffered to offset rcDst by (-175, -y) and
render content at negative X — clipping or hiding it entirely.
Fix: render each rootSite into a temp bitmap at local coords
(0,0,w,h), then composite into the main bitmap at the correct
DataTree-relative position.
2. EnsureAllSlicesInitialized uses BecomeRealInPlace (CompositeViewCapture.cs):
Replaced manual handle-forcing with the production ViewSlice
initialization path, which sets AllowLayout=true and triggers
rootBox.Layout with the correct width.
3. Trailing separator bar removal (VectorReferenceView.cs,
PossibilityVectorReferenceView.cs):
DisplayVec called AddSeparatorBar after every item including the
last, causing VwSeparatorBox to draw unwanted grey bars after
single/final items like 'Main Dictionary'. Added guard to only
add separators between items.
Baselines regenerated — all 6 scenarios show 40-70% more rendered
content. All 23 DataTree tests pass (timing + optimization + snapshots).
# This is the commit message #5:
Added tests before virtualization
# This is the commit message #6:
update renders
# This is the commit message #7:
Hwnd implementation started
# This is the commit message #8:
upgrade openspec
# This is the commit message #9:
hwnd implementation1 parent bcfbea0 commit c4678e8
File tree
167 files changed
+30813
-297
lines changed- .GitHub/skills
- code-review-skill-main
- assets
- reference
- scripts
- render-testing
- .beads
- .github
- instructions
- prompts
- skills
- openspec-apply-change
- openspec-archive-change
- openspec-bulk-archive-change
- openspec-continue-change
- openspec-explore
- openspec-ff-change
- openspec-new-change
- openspec-onboard
- openspec-sync-specs
- openspec-verify-change
- .vscode
- Src
- Common
- Controls/DetailControls
- DetailControlsTests
- FieldWorks
- RenderVerification
- RootSite/RootSiteTests
- TestData
- LexText
- Lexicon
- Morphology
- views
- openspec/changes
- hwnd-grow-only-virtualization
- research
- render-speedup-benchmark
- contracts
- research
- specs/render-speedup-benchmark
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
167 files changed
+30813
-297
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments