Skip to content

MapWinGIS6 – Vector Rendering Performance Improvement Plan - #88

Merged
pmeems merged 6 commits into
developmentfrom
perf-baseline-instrumentation
Nov 19, 2026
Merged

pmeems merged 6 commits into
developmentfrom
perf-baseline-instrumentation

Conversation

@pmeems

@pmeems pmeems commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Motivation

Establish a measured baseline for large-vector loading and initial rendering before changing the scene architecture.

Design

Adds opt-in, thread-safe Core diagnostics consumed by Core and ActiveX, a default-preserving outline-only scene option, and reproducible A-D Release benchmarks. The benchmark reports 205.8 ms of triangulation in a 230.6 ms scene build on 2,459 generated polygons; the first OpenGL frame and glReadPixels are also isolated.

Validation

  • CMake Debug x64 and MSBuild Debug x64 build successfully.
  • 447 non-interactive CTest cases pass; focused diagnostics tests pass.
  • Warning count matches origin/development: 30 pre-existing D9025 warnings, no new compiler warnings.
  • Release benchmark smoke and the 2,459-feature measurement pass.

No new dependencies. No shared-memory changes were needed; durable baseline details are in docs/TESTING.md. OpenGL outline-only rendering remains intentionally deferred to Phase 2.

pmeems and others added 2 commits November 19, 2026 17:44
- Add process-wide opt-in timings and counters across Core and ActiveX
- Benchmark fill-enabled and outline-only GDI/OpenGL configurations
- Document Release results and the remaining OpenGL outline limitation

Co-authored-by: Copilot <[email protected]>
- Add all A-D timings for the supplied 10.3 MB shapefile
- Record the dominant pipeline costs and estimated first-display times

Co-authored-by: Copilot <[email protected]>

@Julian-MW Julian-MW left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review. Final decision is with the human reviewer.

Two minor diagnostics API findings are noted inline. No duplicate findings were found in existing PR comments or review threads.

- Prevent public duration recording while diagnostics are disabled`n- Preserve completion timing for scopes that started enabled

Co-authored-by: Copilot <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The benchmark documentation misidentifies the workload and OpenGL rejection behavior, while snapshot reuse omits cached failed or empty layers from hit counts, producing inconsistent cache statistics.

2 open issues
What changed in this PR

Establishes a measurable baseline for MapWinGIS6 vector loading and rendering before further architectural changes.

Changes:

  • Adds opt-in, thread-safe diagnostics shared by Core and ActiveX.
  • Introduces optional mesh-free scene preparation while preserving existing defaults.
  • Extends rendering benchmarks, adds diagnostics tests, and documents measurements and planned optimization phases.

Builds and tests were not run during this review.

File Description
tests/​MapWinGIS.Core.Tests/​PerformanceDiagnosticsTests.cpp Tests aggregation, enablement, pipeline counters, and mesh-free preparation.
tests/​MapWinGIS.Core.Tests/​MapWinGIS.Core.Tests.vcxproj Registers diagnostics tests with MSBuild.
tests/​MapWinGIS.Core.Tests/​CMakeLists.txt Registers diagnostics tests with CMake.
tests/​MapWinGIS.ActiveX.Tests/​VectorLayerRendererTests.cpp Tests GDI frame timing capture.
tests/​MapWinGIS.ActiveX.Tests/​RenderingBaselineTests.cpp Adds mesh-free benchmarks, external datasets, and detailed timing reports.
src/​MapWinGIS.Core/​src/​vector/​VectorDataset.cpp Instruments dataset opening, metadata, and geometry reads.
src/​MapWinGIS.Core/​src/​rendering/​VectorRenderScene.cpp Adds scene timings and optional fill-mesh preparation.
src/​MapWinGIS.Core/​src/​rendering/​PolygonTriangulation.cpp Records validation, triangulation, and outcome metrics.
src/​MapWinGIS.Core/​src/​rendering/​MapRenderScene.cpp Passes preparation options through map-scene construction.
src/​MapWinGIS.Core/​src/​map/​MapView.cpp Records scene-cache hits and misses.
src/​MapWinGIS.Core/​src/​internal/​VectorRenderSceneBuilder.h Adds preparation options to internal builders.
src/​MapWinGIS.Core/​src/​diagnostics/​PerformanceDiagnostics.cpp Implements atomic counters, snapshots, and scoped timings.
src/​MapWinGIS.Core/​MapWinGIS.Core.vcxproj Includes diagnostics in the MSBuild project.
src/​MapWinGIS.Core/​include/​mapwingis/​rendering/​VectorRenderScene.h Exposes fill-preparation options and factory overloads.
src/​MapWinGIS.Core/​include/​mapwingis/​rendering/​MapRenderScene.h Exposes configurable map-scene preparation.
src/​MapWinGIS.Core/​include/​mapwingis/​diagnostics/​PerformanceDiagnostics.h Declares the shared diagnostics API.
src/​MapWinGIS.Core/​CMakeLists.txt Includes diagnostics in the CMake target.
src/​MapWinGIS.ActiveX/​OpenGlVectorLayerRenderer.cpp Times geometry submission, backend draws, and readback.
src/​MapWinGIS.ActiveX/​GdiVectorLayerRenderer.cpp Times GDI backend draws.
docs/​TESTING.md Documents benchmark execution, results, and limitations.
.github/​plans/​Vector-Rendering-Performance-Improvement.md Records baseline measurements and the phased optimization plan.

Review effort: Balanced

Comment thread docs/TESTING.md Resolved
Comment thread src/MapWinGIS.Core/src/map/MapView.cpp Resolved
Updated performance diagnostics reporting in MapView and clarified testing documentation.

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@pmeems
pmeems enabled auto-merge (squash) November 19, 2026 21:29
@pmeems
pmeems merged commit 65fad25 into development Nov 19, 2026
16 of 17 checks passed
@pmeems
pmeems deleted the perf-baseline-instrumentation branch November 19, 2026 23:58
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.

3 participants