Hey Creators,
Earlier this year we announced Deferred Engine Events, a feature which will allow us to improve the performance of the engine and therefore, your experiences. Our original goal for 2023 was to change the default (which is to say, the behavior of places with SignalBehavior set to Default) from immediate mode to deferred mode. We have decided to take a slightly more incremental approach and today we’ll be sharing what this means for you.
Background
Here’s a quick reminder of what we announced in the original post:
-
Rather than resuming event handlers immediately we queue them up and resume them all at once.
-
This improves performance as code that would usually trigger an event can now complete without needing to run arbitrary event handlers which may themselves trigger further events.
-
This improves security as scripts will only run at specific points in the frame. Doing this eliminates an entire set of vulnerabilities that we would otherwise need to patch on a case-by-case basis.
-
This will allow us to make additional optimizations in the future.
As part of that announcement we shared our long-term plan for the feature and what we were hoping to achieve before the end of the year. Our original goal for 2023 was to change the default (which is to say, the behavior of places with SignalBehavior set to Default) from immediate mode to deferred mode. We have decided to take a slightly more incremental approach and today we’ll be sharing what this means for you.
Updates
Firstly, this afternoon we will be enabling deferred events by default in our template places. This means that when you create a new place it will have deferred events enabled by default. While we encourage you to leave this setting on, we know that some of you may use libraries that are not compatible with deferred events. If this is you, you will still be able to opt-out by changing the SignalBehavior property to Immediate.
Secondly, we are pushing back the date that we change the default SignalBehavior to Deferred until February 2024. We are still actively monitoring the impact this will have on experiences to ensure this transition results in minimal disruption. We will share more details in the new year but as a reminder before then, if your experience is not compatible with deferred events you can opt-out by changing the SignalBehavior setting to Immediate. Even after we change the default, you will still be able to opt-out by setting SignalBehavior to Immediate.
Finally, we have been quietly making some improvements behind the scenes:
-
Based on your feedback we have changed the behavior of Disconnect when deferred events are enabled. Previously, if an event fired multiple times before Disconnect was called the event handler would run for each of those invocations, even after Disconnect was called. Now, all pending invocations will be dropped - the same behavior that exists in immediate mode.
-
We have also made some optimizations to our signal implementation which may slightly improve the performance of your experiences.
Thank You
As mentioned in our previous announcement, one-day we would like all experiences to run with deferred events enabled however we know this is going to take time. We will continue to support immediate mode for the foreseeable future and you can continue to expect it to be years until we are ready to completely switch over to deferred mode. In the meantime we will keep you updated and remain flexible with our plans as we continue this transition.
If you have any comments, concerns, or suggestions then feel free to reach out to me directly over message or on this thread and we can discuss.
Thanks!