LoadCharacter() hogging server resources

I’ve come to talk with you again.

I took a look into this again and found this in the microprofiler when LoadCharacter is called:

This issue is still causing massive performance losses at my games, and the original post seems to prove that it’s out of my control entirely. I think I successfully got a dump of this but I’m not entirely certain how to get to it, if it would be beneficial for debugging this issue then I can upload it here.

5 Likes

Ok I just found out that this is also causing massive issues in Aegis, and I only narrowed it down today… This needs to be resolved, for now im going to just kill the humanoid… Firing it once causes a 50% spike in server usage, and you can clearly tell when its being fired as the lag spike is crazy…

2 Likes

Ping @CodeWriter @TheGamer101 - I thought we resolved this but maybe not.

2 Likes

I also thought that we had resolved this issue, can you provide more information about what issues you are seeing and a way to reproduce them? Are the performance issues you are seeing on the client or the server? Does your game use R15 or R6 avatars?

We have made some significant changes to LoadCharacter since this thread was initially posted so hopefully there aren’t still performance issues related to character loading.

1 Like

R15, 100% server side, replication of everything pauses because of the CPU usage spike in those few frames. The only thing I can tell is that the issue scales with player count. Il see what I can do about a easy repo for you guys. With around 45 players, the spikes are around 50%, less players uses less usage. Running the code in the first post causes the same results in my game that TwentyTwoPilots is seeing in his post 13 days ago.

1 Like

My game relies on LoadCharacter for respawns due to a custom death situation, and it hogs over 50% of the memory, causing a lag spike. Is this still an issue to date?

1 Like

LoadCharacter() is still causing issues… any fixes?

7 Likes

LoadCharacter() continues to create large lag spikes on occasion when used. Is anyone out there?

6 Likes

Yea, this is SUPER annoying.

In both No-Scope Sniping and it’s remake, I use a custom character spawning script that uses LoadCharacter. At the end of a round when this is called in mass, the server dies for a second.

I’m a bit upset that 4 years later, Roblox still hasn’t fixed this bug.

3 Likes

This is an incredibly old bug that needs fixing! I’m ashamed of the Roblox engineers, seeing that this is still around and is causing MAJOR issues.

5 Likes

Almost 2021 and I am still having this bug, still not fixed yet.

2023 and the server still dies for a sec when character loads. (Just ignore this bump if you don’t like it, hopefully no one whines about this.)

edit: oops i meant 2023, not 2022

3 Likes

When I’m testing this using the same method, I’m getting spikes up to about 10ms when respawning but nothing crazy like the above, leading me to believe it was fixed at some point. Check your CharacterAdded events for other problems.

ive tried to make characteradded into command and it still does it. probably just network stuff or roblox not handling physics correctly.

I haven’t noticed this in my games, but I did notice that the server lags when a player joins the game. It happens in on baseplate, so I don’t think I can fix it on my end. Average ping goes from 50 ms to 500-1000ms for a few frames, pretty much goes back to 50 ms in a second.

Yea, Roblox needs to fix lag when player loads.

1 Like

This indeed does still happen, I have a “last man standing” type of round match in which players are all spawned together at the start after choosing their character, the server activity spikes up for a short while.

2 Likes

I figured it out! just set workspace.StreamingEnabled to true. It worked for me.

Sorry for a bump. I just figured it out

This is happening in our game Neighbors 🔊 [Voice Chat & Mic Up] - Roblox. We use :LoadCharacter anytime the character “dies” which causes a clear fps spike and can be seen in the microprofiler.

Edit:
It doesn’t seem to be LoadCharacter itself but instead when working with specific appearances. Doing any of the below will spike fps/profiler. This spike is significantly worse when a character has layered clothing, rthro, or anything similar (eg lots of hairs).

  • Rescaling a character by modifying their body scale values in their Humanoid (BodyDepthScale, BodyHeightScale, etc)
  • Changing a character into another appearance by using ApplyDescription.
  • Spawning the player into the game.
1 Like