"deferredThreads" in Microprofiler: What Does It Mean?

When setting up parallel processing for my script,
I noticed that the microprofiler displays prominent lag tags labeled “deferredThreads”.
What does this signify?

Upon changing the workspace’s SignalBehavior from Deferred to Immediate,
the “deferredThreads” tags were replaced by “RunSignals” tags.
However, the lag remained consistent.


Interestingly, these tags only provide the name of the script and do not specify the actions performed by the script.


It shows that a huge number of very small tags have been executed.


Hierarchical tree of the scripts that cause
When I reduced the actor to one, the lag got very low, I don’t know why.

Do you know anything in deferredThreads or RunSignals?
There’s no information anywhere.

An educated guess:

The task scheduler has a strict pattern to executing stuff. Parallel always come first, and then serial. Firing events will always be done in serial (even though they are safe to call in parallel), so they must wait until the serial stage to actually take effect. That’s why they’re “deferred”, because they are being postponed.

Changing the SignalBehavior has no effect on parallel code because the events are going to be deferred regardless. SignalBehavior is really only meant for serial code, because the default behavior for serial events is that they will work immediately after being called. Setting the behavior to deferred means the events will wait to be sent all at once in bulk, which is the same exact behavior as calling events in parallel.

Probably because you have a bottleneck from firing all those events. Consider trying out alternative data transaction methods, such as SharedTables (which is designed for Parallel Luau)

1 Like

Thank you. That was a great help.
sharing data on a SharedTable is significantly faster than using BindableEvent or Actor:SendMessage() .
The frame time dropped from around 35-40ms to 27ms with SharedTable in my team’s game.

However, SharedTable also causes deferredThreads.

Maybe I should avoid using too much data transfer between threads.