Skip to content

perf(OpenGL): draw only the polydata primitives that own elements - #3639

Open
PaulHax wants to merge 1 commit into
Kitware:masterfrom
PaulHax:upstream-polydata-active-primitives
Open

perf(OpenGL): draw only the polydata primitives that own elements#3639
PaulHax wants to merge 1 commit into
Kitware:masterfrom
PaulHax:upstream-polydata-active-primitives

Conversation

@PaulHax

@PaulHax PaulHax commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Context

vtkOpenGLPolyDataMapper visits all six primitive helpers on every draw, including helpers with no elements. Thats slow.

Results

400 polys-only actors, 300 measured frames per run.

Metric Before After
Median render-call time 29.0 ms 23.8 ms

Changes

Record the active helpers in updateBufferObjects immediately after
buildBufferObjects, including when a subclass overrides buildBufferObjects.
Use that list in renderPieceDraw, retaining the element-count check for helpers
released between rebuilds.

Note: A subclass that replaces updateBufferObjects without calling the base
implementation will not populate the active list.

PR Checklist

  • GitHub Actions CI passed: semantic-release commit messages, lint, and tests
  • Test coverage added
  • Documentation and TypeScript definitions are updated to match these changes

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