Skip to content

Keep instance segmentation refreshes fast with many annotated components - #172

Merged
WouterJansen merged 1 commit into
Cosys-Lab:5.8devfrom
jcfurey:fix/segmentation-refresh-scaling
Oct 5, 2026
Merged

WouterJansen merged 1 commit into
Cosys-Lab:5.8devfrom
jcfurey:fix/segmentation-refresh-scaling

Conversation

@WouterJansen

Copy link
Copy Markdown
Contributor

Each refresh hid every annotation component again in every camera's scene and lighting captures and the player's view with AddUnique, which is quadratic, and never dropped destroyed components; UpdateAnnotation- Components also searched its list for every component. With thousands of annotated meshes a refresh took tens of milliseconds to seconds of game thread time.

  • Hiding uses a set (linear) and drops destroyed components.
  • The annotator remembers the components added since the previous refresh, and cameras hide only those; refresh serial numbers make a camera that is new, or missed a refresh, hide all of them instead. The player's view is updated once per refresh rather than once per camera.
  • UpdateAnnotationComponents looks components up in a set.

Claude-Session: https://claude.ai/code/session_01JmWqXFCY6vDdpRe4VHoaQX

Each refresh hid every annotation component again in every camera's
scene and lighting captures and the player's view with AddUnique, which
is quadratic, and never dropped destroyed components; UpdateAnnotation-
Components also searched its list for every component. With thousands of
annotated meshes a refresh took tens of milliseconds to seconds of game
thread time.

- Hiding uses a set (linear) and drops destroyed components.
- The annotator remembers the components added since the previous
  refresh, and cameras hide only those; refresh serial numbers make a
  camera that is new, or missed a refresh, hide all of them instead. The
  player's view is updated once per refresh rather than once per camera.
- UpdateAnnotationComponents looks components up in a set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JmWqXFCY6vDdpRe4VHoaQX
@WouterJansen
WouterJansen merged commit 13098aa into Cosys-Lab:5.8dev Oct 5, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants