Skip to content

Conversation

@finetjul
Copy link
Member

Context

Rendering is slow when a scene has many actors. This is slow since addMissingNodes() enforceOrder has been added.

Results

Performance should be back to before what they were before enforceOrder was added.

Changes

Add caching for OpenGLCamera node and do not enforce data objs to be at the beginning of the children list.

  • Documentation and TypeScript definitions were updated to match those changes

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • This change adds or fixes unit tests
  • Tested environment:
    • vtk.js:
    • OS:
    • Browser:

@finetjul finetjul requested a review from sankhesh November 21, 2025 22:43
Avoid using filter() and includes() that are slow operations.

issue Kitware#3351
Provide the previously found view node to avoid a full search each time
a prepass of buildPass is done

issue Kitware#3351
enforceOrder was forcing the dataObjs nodes to be the first children. That had the disadvantage to
make the OpenGLCamera the last item, and slow to be found. Instead, enforceOrder now simply enforce
that the created missing nodes are following each others.

fix #3497
@finetjul finetjul force-pushed the 3351-fix-many-actors-performance-hit branch from 9bfbec9 to 6c6b2da Compare November 21, 2025 23:34
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