Skip to content

Debounce tree updates#809

Merged
Micheal Parks (micheal-parks) merged 2 commits into
mainfrom
tree-debounce
Jul 2, 2026
Merged

Debounce tree updates#809
Micheal Parks (micheal-parks) merged 2 commits into
mainfrom
tree-debounce

Conversation

@micheal-parks

@micheal-parks Micheal Parks (micheal-parks) commented Jul 2, 2026

Copy link
Copy Markdown
Member

Overview

In scenes that have very rapid add / remove cycles, a major CPU bottleneck becomes rebuilding the treeview. In one scene I observed, around 8,000 dom nodes were being replaced per frame, grinding framerate down to around 6fps.

This PR simply debounces updates to around every 100ms. This is still faster than pretty much anyone is going to perceive. The result of the same scene is a much higher framerate. See the performance profiler in the top right.

Before:

Screenshot 2026-07-02 at 13 52 50

After:

Screenshot 2026-07-02 at 15 23 33

@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fc7bcd1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@viamrobotics/motion-tools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-02 20:50 UTC

@micheal-parks Micheal Parks (micheal-parks) merged commit 56bf4bc into main Jul 2, 2026
8 checks passed
@micheal-parks Micheal Parks (micheal-parks) deleted the tree-debounce branch July 2, 2026 20:50
@claude claude Bot mentioned this pull request Jul 2, 2026
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.

2 participants