Since around 1-2 weeks me and a lot of other people have been getting stuttering across different games.
When a player is walking and moving their mouse at the same time, the PlayerListManager script will execute very expensive computations which causes frames to be delayed (as shown in the video) in certain cases (explained below).
The computation cost scales with the amount of teams and with the amount of players as well. After a certain number of players and teams are on a server it will exceed the usual 16.67 ms frame time and cause stuttering. When either stopping the movement of the player or the mouse, it disappears.
Microprofiler Analysis:
Looking at the microprofiler it is easy to tell that the Heartbeat bound part of the PlayerListManager script, which seems to be the new leaderlist, is causing stuttering with up to 30ms per render. (20 players, 23 teams)
This delay happens every rendered frame while moving player and mouse as seen in the picture.
The underlying operations are mainly Lua GCincrementals (in red), LocalizationService:attemptTranslation namecalls (in bright yellow) and indexing of player.TeamColor and team.TeamColor (darker yellow). It’s interesting to note that the game the videos are from (603943201) does not have any localization/translations enabled whatsoever. I have added the profiler dump at the bottom.
It is possible to reproduce this behaviour in studio/live but the stutter likely won’t appear unless there’s more than 20 players and/or teams.
- Open a new baseplate and add 10+ different teams
- Start a local server with 5+ players
- Take control of one player and do the same movements as explained or shown in the video below
On a default Baseplate with 11 teams and 6 players the PlayerListManager runs for more than 3ms which is awfully long.
I play on a 64bit Windows 10 desktop system with an i5-6600K CPU.
microprofile-20200129-204934.html (8.3 MB)