Skip to content

Fix: prevent Studio freeze when clicking Test button - #37

Merged
TonyD365 merged 1 commit into
mainfrom
fix/studio-freeze-on-test
Aug 9, 2026
Merged

Fix: prevent Studio freeze when clicking Test button#37
TonyD365 merged 1 commit into
mainfrom
fix/studio-freeze-on-test

Conversation

@TonyD365

@TonyD365 TonyD365 commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

Fix Studio freeze issue when clicking the Test button in Roblox Studio.

Root Cause

The start_test handler called RunService: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() in task.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

  • Modified plugin/src/handlers/run.luau to use task.spawn() for RunService:Run()

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

Bridge benchmark — this PR vs base (main)

Same-runner, back-to-back run of the command hot path (dispatch → queue → plugin takes command → response → resolve) with an in-process simulated plugin.

Sequential round-trip latency (smaller is better)

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.

@TonyD365
TonyD365 merged commit 7d4e898 into main Aug 9, 2026
4 checks passed
@TonyD365
TonyD365 deleted the fix/studio-freeze-on-test branch August 9, 2026 00:13
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