Skip to content

Comments

When closing recordings (and blueprints), drop them on separate threads for UI responsiveness.#11834

Merged
Wumpf merged 3 commits intorerun-io:mainfrom
kpreid:drop-recording
Nov 12, 2025
Merged

When closing recordings (and blueprints), drop them on separate threads for UI responsiveness.#11834
Wumpf merged 3 commits intorerun-io:mainfrom
kpreid:drop-recording

Conversation

@kpreid
Copy link
Contributor

@kpreid kpreid commented Nov 9, 2025

In StoreHub::remove_store(), execute drop of the store on a separate thread created for the purpose.

This prevents the UI from hanging while dropping a large recording, which is useful when the user is trying to close multiple recordings at once.

If threads are not available, automatically falls back to dropping on the current thread.

Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Good idea - thank you!

@emilk emilk added 📺 re_viewer affects re_viewer itself 📉 performance Optimization, memory use, etc include in changelog labels Nov 10, 2025
@Wumpf
Copy link
Member

Wumpf commented Nov 10, 2025

CI is unhappy because this code gets hit on wasm (gets correctly stuck in our disallowed method list for wasm)

@kpreid
Copy link
Contributor Author

kpreid commented Nov 10, 2025

CI is unhappy because this code gets hit on wasm (gets correctly stuck in our disallowed method list for wasm)

Whoops, I failed to notice that that lint was not a preexisting one but caused by my change, due to misreading what it was pointing at.

The code already works as intended on wasm: the thread spawn returns an error, and this error is discarded, causing the store to be dropped on the current thread. I’ve added an #[allow] with explanation of this, and adjusted the code to be lint-free.

This prevents the UI from hanging while dropping a large recording,
which is useful when the user is trying to close multiple recordings
at once.

If threads are not available, automatically falls back to dropping on
the current thread.
@Wumpf Wumpf merged commit 3b21efe into rerun-io:main Nov 12, 2025
34 checks passed
@emilk emilk added the consider-patch PRs & issues that should be considered to be cherry-picked to a patch release branch. label Nov 12, 2025
@kpreid kpreid deleted the drop-recording branch November 12, 2025 16:11
IsseW pushed a commit that referenced this pull request Nov 12, 2025
…ds for UI responsiveness. (#11834)

Co-authored-by: Andreas Reich <r_andreas2@web.de>
@IsseW IsseW removed the consider-patch PRs & issues that should be considered to be cherry-picked to a patch release branch. label Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

include in changelog 📉 performance Optimization, memory use, etc 📺 re_viewer affects re_viewer itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants