Repository navigation
perf(vtk): skip the image layer when picking widgets - #1044
Merged
Merged
Conversation
Widget picking redraws every renderer once per selection pass and blocks on readPixels after each pass. Slice views keep images in a separate renderer that never holds widgets, so hide it while the selector captures. This keeps expensive image layers, like the en face slab projection, out of every pointer move.
✅ Deploy Preview for volview-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Widget picking runs on every pointer move. The hardware selector redraws every renderer in the view once per selection pass and blocks on `readPixels` after each pass. Slice views draw images in a separate renderer that never holds widgets, so that layer was redrawn several times per move for nothing.
This hides the image layer while the widget manager's selector captures, and restores it when the capture ends.
The cost matters most for expensive image layers. The en face slab projection samples the whole slab depth per pixel, so with annotation widgets on an en face view (#1022) dragging a rectangle handle lagged well behind the cursor. With this change, handle drags there respond like they do in the axial view.