Edit: Oh neat, this may not be a problem.
This seems to solve this problem of signals firing re-entrance. As long as events fired in the data model are ok, we should be fine.
I’m sorry, but please do not release this change as-is. This will destroy responsiveness in all of my experienes, and (I assume) many others experiences. The code will still function, but this change may introduce significantly latency (read: multiple frames) of latency.
The root of the issue is that I, and many others chain signals together that flow across our data models. If anyone has code like this, this change introduces latency into core data models.
This change breaks how I, and many other developers, program, forcing me to add latency into my game. I use Roblox’s datamodel as the source of truth. We gave a [programming talk]( 5 Powerful Code Patterns Behind Top Roblox Games) at RDC about this. We use signals such as:
- Attributes
- CollectionService
- ChildAdded/ChildRemoved
- PropertyChanged events
I also use signals for internal models that don’t use Roblox as a source of truth.
By doing this, we introduce unavoidable latency into my datamodel updates. For example, consider this scenario.
- I instantiate a new object into the game, tag with CollectionService
- Event fires (later now), we set some properties and then we maybe instantiate 2-3 other objects with tags. Finally, we parent these.
- These child added events fire (later now), and so we do this again
- We repeat a few more times, and now stuff loads in over 3-4 frames, instead of one.
Another example if where I recursively replicate properties in my virtual data-model using signals downwards. This will now occur over multiple frames, missing first-rate responsiveness. This is a super common pattern.
- Listen to input
- Abstract input into a data model and fire off the event (like setting a bool value, or having a custom signal)
- Listen to this abstraction instead of the true input event.
By making this change, we introduce a round of latency between this input and the response to the user. In more complicated data models, we may introduce even FURTHER rounds of latency, leading to multiple frame delays. In something like a VR, this is deadly.
It will be very hard to audit all of the places that I am using signals. :Connect occurs 1923 times across 910 scripts in my experiences. These thousands of concurrent users, and my code is used in many more places.
Please consider an alternative behavior. I’m willing to sit down and chat about this, because this is a truly disruptive and breaking change for us.