Fix: prevent Studio freeze when clicking Test button - #37
Merged
Conversation
Bridge benchmark — this PR vs base (
|
| metric | base | this PR | change |
|---|---|---|---|
| p50 | 0.008 ms | 0.013 ms | +62.5% 🔺 |
| p90 | 0.009 ms | 0.014 ms | +55.6% 🔺 |
| p99 | 0.051 ms | 0.041 ms | -19.6% 🔻 |
| mean | 0.009 ms | 0.014 ms | +55.6% 🔺 |
Serial throughput (bigger is better)
| metric | base | this PR | change |
|---|---|---|---|
| ops/sec | 90218 ops/s | 85749 ops/s | -5.0% 🔻 worse |
⚠️ Possible regression — latency or throughput moved by more than 20%. Please review whether this PR slows down the bridge.
Microbenchmark — small deltas (a few %) are runner noise. Measures the local bridge only; a real Studio plugin adds DataModel + network time. Node base v20.20.2 / head v20.20.2.
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.
Summary
Fix Studio freeze issue when clicking the Test button in Roblox Studio.
Root Cause
The
start_testhandler calledRunService:Run()synchronously, which is a blocking operation. This prevented the WebSocket message handler from returning, causing Studio to freeze when the desktop app sent a start_test command.Solution
Wrapped
RunService:Run()intask.spawn()to execute it asynchronously in a separate thread. This allows the WebSocket handler to return immediately while the game starts running in the background.Changes
plugin/src/handlers/run.luauto usetask.spawn()forRunService:Run()