Skip to content

Conversation

@boatbomber
Copy link
Member

@boatbomber boatbomber commented Oct 23, 2025

The majority of the hang is actually just HttpService:JSONDecode taking ages on massive trees.

This PR does not address that problem. It does, however, make a couple small improvements.

  1. The patch tree is computed while on the loading page, rather than switching to a blank confirmation page while waiting for the tree to compute.
  2. The patch tree computation runs across frames to avoid hanging Studio.
  3. The loading page gets a line of text saying the current step.
Demo.mp4

@boatbomber boatbomber requested a review from Dekkonot October 23, 2025 08:42
@boatbomber boatbomber self-assigned this Oct 23, 2025
@boatbomber boatbomber added scope: plugin Relevant to the Roblox Studio plugin impact: small Minor papercuts in Rojo that don't warrant immediate resolutoin. labels Oct 23, 2025
local getProperty = require(Plugin.Reconciler.getProperty)

local function yieldIfNeeded(clock)
if os.clock() - clock > 1 / 20 then
Copy link
Member

Choose a reason for hiding this comment

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

1/20 of a second feels like an arbitrary time. task.wait() is something like 1/30th of a second, right?

Copy link
Member Author

@boatbomber boatbomber Nov 6, 2025

Choose a reason for hiding this comment

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

It's actually just to the next Heartbeat, which could be 1/240th of a second. You're thinking of the old wait(). 1/20 is arbitrary, but I played with a couple values and this one felt like a good balance between slowing it down and making it not freeze up.

@boatbomber boatbomber merged commit 54e63d8 into rojo-rbx:master Nov 6, 2025
8 checks passed
@boatbomber boatbomber deleted the bugfix/slightly-improve-initial-sync-hangs branch November 6, 2025 08:06
@Quenty
Copy link
Contributor

Quenty commented Dec 31, 2025

See #1176 for potential fix on performance in terms of total data throughput

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact: small Minor papercuts in Rojo that don't warrant immediate resolutoin. scope: plugin Relevant to the Roblox Studio plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants