Skip to content

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

Merged
finetjul merged 1 commit into
Kitware:masterfrom
PaulHax:upstream-polydata-active-primitives
Sep 10, 2026
Merged

finetjul merged 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

@sankhesh sankhesh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@finetjul
finetjul added this pull request to the merge queue Sep 10, 2026
Merged via the queue into Kitware:master with commit 09fa208 Sep 10, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 36.14.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions Bot added the released Automated label label Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Automated label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants