Script_PlayerListManager causing lag on mobile despite no player leaderboard or list being open

Script_PlayerListManager seems to be causing severe CPU spikes on mobile despite the Leaderboard CoreGui being disabled and the Roblox menu closed.

I have recently been working on many optimizations for SCP: Roleplay and while analyzing possible causes for lag on mobile when in a 40 player server, I noticed that Script_PlayerListManager is eating up a considerable amount of time per frame and some times even results in spikes causing FPS drops.

This is extremely problematic, because in SCP: Roleplay, despite heavy optimizations and techniques already being in place, mobile players still suffer from bad performance, which is noticeable in our metrics where Computer has 58~ average fps and Phone sits at a measly 39 at the moment.

SCP: Roleplay is a visually demanding experience, despite our best efforts at optimizations. It runs many performance heavy tasks such as night vision goggles, gun laser replication, SCP recontainment, detailed armor and vests, and more.
Despite all this, SCP: Roleplay still runs relatively well even on low hardware. That is, until you join a server that is full in player count.

Testing on my phone, I achieve 60 FPS at the Security Department spawn.
In a full server, that number drops to 30.

That is a drastic difference and causes a lot of players to quit, as it makes the game nearly unplayable with how fast paced some of the reactions have to be when playing a game of this nature.

While investigating this in detail, I have come to the conclusion that when it comes to an empty server and a full server, the GPU frame time barely changes. (for which I’m also including the rendering stage of the CPU etc.). What does change considerably is Heartbeat.

An obligatory note to avoid any confusion: Controller is a game-essential local script that handles gun and camera movement and controls, as well as replication of things such as lasers, equipped radios, etc., and is expected to increase in frame time usage with player count - even so, this increase should not warrant such a drastic drop in FPS, which is justified instead by Script_PlayerListManager, of which does indeed take a long amount of frame time much more considerable than Controller.

This is the frame time in an empty server:


Controller: 0.387ms

And this is the same experience but on a full server:


Controller: 1.324ms

While it is true that Controller having an increased frame time will contribute towards lower FPS when the CPU is already the bottleneck, the fact that there is computation being done for a player list that is not even visible to the player just makes matters worse.

We are working on optimizing these scripts as much as we can, but there are certain things that we can do nothing about and this is one of them. Having the player list be changed to not run when the leaderboard is disabled, or at the very least run less heavy code, would assist tremendously for people who run on lower end devices.

I am not a Roblox engineer so there is only so much I can guess as to Script_PlayerListManager’s nature, but it might be related to the Roblox menu instead of the Leaderboard CoreGui, or something else entirely.

ScriptProfiler taken from Desktop:



image

CoreScripts/ExperienceChatMain seems to also be affected.
image

This could possibly be related to the fact most characters in-game have an armor morph. We already have it where the most tri-heavy components of the morphs are welded to the character and in a separate folder rather than in the character. This applies to helmets and vests. There are some accessories that would be very difficult (albeit not impossible) to move out of character which are merely cosmetic / visual, but this would represent a big undertaking that could be avoided if this could be solved on the Engine’s end.
Most of these accessories are the equivalent of having an UGC item in the character, so it does not make a lot of sense that they’d be responsible for this.

5 Likes

Hi @MetatableIndex , thanks for reporting this issue with details! As we are investigating it, could you please provide more info on:

  1. Are you still seeing this issue now?
  2. Are you experiencing the issue on all platforms? Please provide the OS names / device models where you see the issue.
  3. Are there any certain repro steps to trigger the issue after joining the game?

Thank you!

1 Like

Hi,
It appears that the issue is still present.

This seems to only occur on servers that have a lot of people on them.

In order to ensure that you are in a server with a sufficient amount of people, you could try joining through the server browser.
The game has a prompt that shows up in small servers, asking if you’d like to join a bigger one, but it doesn’t kick in if the server is too new or if it has more than 20 players.

Upon joining a filled server, you should spawn in as a Class - D or as a Security Department and move away from spawn til you find people. Usually this is enough to see the lagspikes settle in.

Seems to be related to in-game chat.

I have tested on a Samsung A52 (Android) and the frames dropped as low as 12, despite having 55 on the same spot on an empty server.
Seems to happen on any OS though, as I could see those spikes in the ScriptProfiler on my desktop.

1 Like