Ok. My review overall is that this API surface is nice (although we’ll see how I scale some other tasks/services for localized actors. Would love to see the design document.
I tried to get BindableFunctions to work properly, and it does seem to work, but there’s a lot of overhead.
Small error: it seems like IsDescendantOf() errors despite being whitelisted.
-- LocalScript
print(script:IsDescendantOf("Actor"))
--[[
18:52:40.897 Unable to cast value to Object - Client - LocalScript:1
18:52:40.897 Stack Begin - Studio
18:52:40.897 Script 'Players.Quenty.PlayerGui.ScreenGui.LocalScript', Line 1 - Studio - LocalScript:1
18:52:40.897 Stack End - Studio
--]]
So the big thing I just verified was whether or not you can use bindable functions to invoke control, and then get it back. The answer is yes, you can. but, it’s expensive. In most cases, it cost 5-6 frames, but sometimesthat number spikes up to 12 frames. So this sort of individual task dispatching is quite expensive (200 ms). With the desynchronize turned off, it costs more like 16 ms to send 100 requests (1/60). Of course, we’re paying a very large overhead for serialization, but apparently the parallel delay costs us another.
I think maybe this will be better with more parallel entry points, this number will go down.
Here’s the code I used to test this:
Happy case (seems to avoid delaying at all, which is good): This does not happen very often.
19:09:10.527 Executing on Actor_10 with 96 after 0.007881 secs - Server - TaskFarm:79
19:09:10.527 Executing on Actor_7 with 82 after 0.008289 secs - Server - TaskFarm:79
19:09:10.527 Executing on Actor_15 with 81 after 0.008205 secs - Server - TaskFarm:79
19:09:10.527 Executing on Actor_23 with 89 after 0.008577 secs - Server - TaskFarm:79
19:09:10.527 Executing on Actor_7 with 94 after 0.008716 secs - Server - TaskFarm:79
19:09:10.620 Done executing all tasks 0.10087809996912 - Server - TaskFarm:75
In general, resolving back to the final result is the problem.
If you’re spinning up your task-farm adhoc you can see it can be a lot worse. You can see it takes an additional 5-6 frames in certain cases after the last execution point to finish everything:
19:04:46.981 Executing on Actor_5 with 73 after 0.081986 secs - Server - TaskFarm:79
19:04:46.981 Executing on Actor_21 with 77 after 0.082116 secs - Server - TaskFarm:79
19:04:46.981 Executing on Actor_5 with 78 after 0.082221 secs - Server - TaskFarm:79
19:04:46.981 Executing on Actor_21 with 99 after 0.082325 secs - Server - TaskFarm:79
19:04:47.087 Done executing all tasks 0.18825740000466 - Server - TaskFarm:75
19:08:06.658 Executing on Actor_1 with 55 after 0.100157 secs - Server - TaskFarm:79
19:08:06.658 Executing on Actor_12 with 49 after 0.100198 secs - Server - TaskFarm:79
19:08:06.658 Executing on Actor_1 with 100 after 0.100253 secs - Server - TaskFarm:79
19:08:06.658 Executing on Actor_12 with 53 after 0.100343 secs - Server - TaskFarm:79
19:08:06.658 Executing on Actor_12 with 54 after 0.100495 secs - Server - TaskFarm:79
19:08:06.761 Done executing all tasks 0.20351199997822 - Server - TaskFarm:75