PlayerListManager unnecessarily eats up CPU time

Hi folks in this thread, as we are investigating the issue, we have a few questions for you too:

  1. Are you still seeing the issue as of today (May, 1st 2024)?
  2. If so, what devices are you seeing it?
  3. Are there any certain repro steps to trigger the issue to happen?

Thank you!

2 Likes

Hi,

Yes, we’re still seeing this issue - even in games where the CoreGui PlayerList is disabled and replaced entirely. I see it occur consistently on my Pixel 2XL.

After some extensive testing at various experiences who have the leaderboard enabled, the PlayerList labels that once took up to 1.42ms now take 0.003ms, if a label was even seen (most frames did not contain a debug profiler detriment large enough to label). I would consider that a great improvement in performance.

The circumstances that cause this performance degradation have to do with updating ValueBases under the leaderstats folder. Any consistent updates to leaderstats worsen performance, noticeably more so when players’ positions rearrange on the leaderboard (performance degradation still occurs without that being the case, too).

4 Likes

Before this update, we’ve noticed issues in our tycoon games such as Mining Factory Tycoon and Business Life where player cash is updated very frequently and will often be very large numbers. I don’t have the exact numbers from before, but we commonly saw around 10-15ms labels with some 30ms+. To minimize this we implemented a system that throttles how often the leaderstats are updated to be reflected on the player list.

We just tested the player list in Business Life with the throttling removed, and the improvements are definitely noticeable. There are multiple frames were nothing is updating and reading 0.002ms, and frames where updates happen are as high as 0.3-0.5ms with a few peaks of 1-5ms seen once every few seconds or so.

Given how often we update our leaderstats, this should probably be expected, but these performance improvements are very good overall. For the time being though, we’re going to stick with our throttling system.

4 Likes

I’m still seeing this issue but less often and I don’t have any repro steps , it’s very random

I have tested in: Drive World :racing_car: Drifting & Racing - Roblox

System Information
CPU: Intel(R) Core™ i5-8300H CPU @ 2.30GHz
GPU: NVIDIA GeForce GTX 1050
RAM: 8GB
OS: Windows 11 | 23H2

2 Likes

I do see it takes a lot of time during opening the game. Does it also happen during gameplay on your side?

1 Like

It’s even happening during gameplay, I even got worse without doing nothing

3 Likes

Drive World uses 4 int values under leaderstats, each one with a Priority value set to set player list sorting. Miles driven, cash, race wins and level. Cash and miles are the most commonly updated.

1 Like

Thanks for the info! Do you see more cpu time spikes when the sorting happens?

Honestly I couldn’t tell you, since a full server has a lot going on all the time in the player list. Can do more investigation if that is the suspected cause.

Straight from the script profiler, this tends to happen every ~20 or so seconds, bringing my FPS down to 10 from 60

This was recorded (May 10th) on the client, I am on Desktop PC
It’s always this exact same thing that shows up when it causes lag, and in the microprofiler, it looks the exact same as @Lucatacos2213 's microprofiler


It only tends to occur when the place has 25+ users in a server at a time and happens irregularly, starts and then repeats, only to stop entirely after about a minute but then starts lagging again eventually,
it might be caused when a player leaves? Could’ve just been a coincidence that it lagged when someone left

I’m experiencing this on a game I work on with another person,

I run at 60 fps when I’m alone in the server
idk if this info helps but:
gpu: GTX 1060
cpu: AMD 5500
ram: 16

edit:
Experience chat main loves to cause issues aswell, dont know why

1 Like

Also happening in my experience: [🔥 UPDATE ] Police Roleplay Simulator 2 - Roblox

2 Likes

Bump

image
image

1 Like

Here is similar topic Major Issue with Roblox performance and frame rate - #33 by Laverdio

It is about input issue when you press the key and rotate camera with mouse FPS will drop. It is especially visible on low end devices. You can check it on your own and see that in microprofiler when you doing this PlayerListManager or Unkown script takes a lot of ‘ms’ time. And it happens in every game.
Thanksfully roblox guy said they investigating it.

2 Likes

We just shipped our own player list in Drive World, however I’m still seeing micro profiler tags for PlayerListManager. Why is this still running when it’s completely disabled?

9 Likes

From looking at the CoreScripts briefly, I think it still runs the functions related to the player list in the background regardless of whether it is enabled or not.

1 Like

Bump, this still occurs. Repro steps are same as the original thread, and happens on PC for us. The StatsItem objects are being indexed by their DisplayName, then a method call to GetValue, followed by a method call to GetChildren.

1 Like

Opening and closing the player list makes it even worse.

2 Likes

There should be a minimized footprint of the PlayerListManager when it is not being used, I don’t like how much performance it takes away. I am getting the same problem on PC

4 Likes

Bump, still occurs and it’s very annoying. It takes up 2ms with just four players in a lobby, which is absurd. that’s 12,5% of the frame budget to keep the game running at 60 FPS; and over 25% if you want to have 140 FPS!

5 Likes

Bump, this also is something that I’m dealing with. This is a really strange bug that has been eating up CPU usage, I use quite a few Teams and use a points counter on a leaderstat folder. Kinda considering dropping that.

1 Like