This is an advance announcement - Heartbeat will change behavior on Thursday (March 24th).
Currently Heartbeat is running at approximately 30 Hz (with the exception of slowly running games where we can’t maintain 30 Hz heartbeat).
On Thursday Heartbeat will start running at whatever framerate the game runs at. This means that it will usually run somewhere between 30 Hz and 60 Hz (higher for VR).
Since the only high-frequency signal in ROBLOX at this time is RenderStepped, some developers of games and scripts are using it as a signal to run the game logic, custom animations, custom replication etc. at. Due to the way ROBLOX frame is scheduled, this limits the performance of games in certain cases. In the worst case, running code in RenderStepped as opposed to Heartbeat can slow down the game by ~2x.
After this change developers will be advised to migrate most of code like that to Heartbeat (with a notable exception of scripts that work with camera and/or character). Essentially if you want to run your code at a high-frequency, you should use Heartbeat; and you should only run code as part of RenderStepped if running it in Heartbeat introduces artifacts you can not tolerate (e.g. visual separation between camera and other objects due to different update times).
There are two practical consequences of this change:
If you were relying on the fact that Heartbeat is 30 Hz, your code may change behavior. As a reminder, you’re expected to use the “step” argument in Heartbeat signal to perform time-based updates. If you use Heartbeat, you should audit your code NOW to prepare for the change.
If you had previously used Heartbeat signal to run lots of Lua code without regard to performance, average framerate in your game may drop. This is not really a problem in practice - if you had a lot of Lua code running as part of Heartbeat, the game would typically alternate between fast frames (e.g. 15 ms) and slow frames (e.g. 35 ms - assuming Heartbeat took 20 ms). While you may think that saving time every other frame is good for performance, in reality the odd-even frame pattern leads to stuttering that’s much more objectionable than smooth but lower framerate. If you do have a lot of game logic the correct solution is so try to spread this logic out over multiple frames.
I will update this thread when the change goes live. Feel free to ask questions or post comments here before or after the change.