Script Profiler doesn't properly acknowledge ConnectParallel

ConnectParallel doesn’t properly show in the Script Profiler. This happens on the client, on the server and in Roblox Studio. The ConnectParallel bug doesn’t happen strictly with only with the “callCallback” section but other sections as well, such as “delayedThreads”.

Reproduction:
Uncopylocked place of ConnectParallel not working properly: Parallel Lua Roblox Bug - Roblox
Either join the game or open in studio & play test.

Script Profiler View:
Client-Side:


Server-Side:

MicroProfiler:
Client-Side:


Server-Side:

Code:
ConnectParallel:

game:GetService("RunService").Heartbeat:ConnectParallel(function(): ()
	task.desynchronize()
	for i: number = 1, 2_048 do
		workspace:Raycast(Vector3.zero, Vector3.one);
	end;
end);

Non-ConnectParallel:

while true do
	task.desynchronize()
	for i: number = 1, 2_048 do
		workspace:Raycast(Vector3.zero, Vector3.one);
	end;
	task.wait()
end

Another case of the bug on a non-baseplate: (Game link but it’s a closed access game in testing: [Segunda Update] Peroxide [Wave 2] - Roblox )

System Information:
i9-13900KF, 64 GB DDR4, Windows 11 (Note that it happens in Roblox Studio and on the server as well as the client)

Expected behavior

Expected behavior is that Parallel Luau scripts should properly be shown under the Parallel Luau section of Script Profiler when using ConnectParallel.

17 Likes

Thank you for the report, we have a fix ready for samples marked as generic `callCallback’ instead of ‘Parallel Luau’.

For delayedThreads, samples are already correctly attributed, that stage is not executing in parallel.

4 Likes

Patch rolled out and everything works as expected now on both client-side & server-side :tada:.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.