Layered clothing causes lag spikes when updating unrelated part properties

To add to this forum, I’m also having issues with layered clothing.
Playing and stopping an animation on a character who’s wearing layered clothing causes the device to lose frames. The severity depends on how detailed the layered clothing piece is, and I believe how fast the transition into the animation is as well.
Are you working on this issue as well? What timestamp can I expect this problem to be fixed by?

7 Likes

Animation changes should not trigger LC rebuilds. If you think it is, can you please post a new bug report for better visibility? Thanks.

5 Likes

Would like to add this:


it causes GraphicsTextureCharacter to increase overtime and it does not decrease. This only occurs with layered clothing and is a possible memory leak.


I found that the exact moments it increases is when I add a highlight to my character (not the actual roblox highlights but my own). I clone all the parts such as arms,legs,head,etc and increase the size, make it transparent, destroy all children, and weld it ontop of the original limb after setting the color and destroy it after a few seconds.

This did not lag my game prior and I did not make any changes to my character auras.

3 Likes

Can you please submit a new bug report for this too? Having multiple bug reports in one thread is difficult for us to manage as they may have very different root causes and may need to be addressed by different groups. Thanks!

4 Likes

I am unable to submit new bug reports.

I do believe this falls under the same issue though as its the same replication. I am just stating that when the lag spikes occur they dont go down implying it could be a memory leak.

4 Likes

We understand the source of the lags and have an improvement for that in progress, but we had not seen reports of a memory leak before this. They may be two seperate bugs, or it may be an issue specific to your setup. Do you have a simple test place you can share?

5 Likes

I made this test place. Pressing Q will create a character aura for 1 second. I encourage you to try this without wearing any layered clothing then try with layered clothing and watch GraphicsTextureCharacter rise everytime u press Q along with an fps drop.

Just so you know exactly whats going on as well. The character aura simply clones all the body parts and changes things like color, size, material, etc then welds it to the original part and parents it to that same part.

6 Likes

Hi Bedevere. I just posted a new thread regarding my issue. Below is the link to it. Please have a look at the problem. Thank you.

4 Likes

Can you please start a new thread for the memory leak issue? Thanks.

3 Likes

Like I said before I am unable to create topics in bug reports unfortunately but maybe someone can do it on my behalf.

5 Likes

Yes, I understand. Can you start a thread in Help and Feedback? For example:

3 Likes
3 Likes

I’d like to add to this issue that its severely effecting my games playability (and possibly a lot of others). The memory leak issue has been resolved but there is still SEVERE fps drops when parts are added to the character. My game (and a lot of others) has a weapon welded to your back as well as a weapon rigged to your hand (at least 1 is invisible at all times) When equipped the weapon in your hand turns visible and the one on your back goes invisible and vice versa when you unequip the weapon. Players are able to spam re-equip their weapon which causes unplayable FPS drops just by simply unequipping and re-equipping a tool.

(I also tested this with regular tools using just part handles instead of rigging anything and it also causes the severe lag spikes, this means players can lag games just by constantly re-equipping tools with layered clothing.)

What specifically causes the most lag is when parts are added to a specific kind of character in my game that has wings
image

The wings simply consist of an invisible part the same size of the uppertorso that gets cframed to the uppertorso then welded. Theres then like 3 or 4 sections of each wing that are motor6d’d together.
And yes this is the same issue as once I removed all layer clothing fps spikes wouldn’t occur so it is not a problem with the wings. The wings just amplify the lag with layered clothing for whatever reason.

4 Likes

Can confirm this is an issue. Equipping and unequipping a tool for example will cause layered clothing to rebuild. Sitting in a seat will cause it to rebuild. Rescaling a character through their scale values will also cause a rebuild. Any eta on a fix for this?

3 Likes

I do believe rescaling a character causing rebuilds is intentional. But I recently added a system in my game where when you talk to NPCs their mouth opens and closes which literally sets the transparency of 2 decals to 0 and 1 and even just that will cause noticeable FPS drops as it triggers the rebuilds every single time.

For a simple repro you can literally have a loop setting a dummy’s face transparency every second and equip that dummy with layered clothing and watch the FPS drop.

I wish we had a way to disable layered clothing rebuilds as I dont rescale the characters or change them in anyway that would even require a rebuild aside from initial spawning in. Idk why setting decal transparencies would even trigger rebuilds in the first place.

2 Likes

Hello to make this easier for staff to solve I updated my layered clothing lag test replication place to show how my use case is game-breaking and potentially help staff come to a solution quicker.

Instructions:
I recommend you use the blocky avatar although it doesn’t really matter that much. Also use a decal face if you want the face toggling to work. (and obviously wear as much layered clothing as you can)

Keybinds:
Q - adds an aura made of parts around the character then destroys it after a few seconds. This is how u essentially see the lag.

C - This is a toggle key. When enabled your faces transparency will change every task.wait(0.05) this is to show that something completely unrelated to layer clothing can still cause the rebuilds

X - This is a toggle key that will add and remove the exact wings I use on my characters which amplify the problem A LOT. I highly recommend you try this with the wings on just to see how bad it gets when adding extra rigging to the character.

B - This is a toggle. When active it changes the transparency of your lefthand every task.wait(0.05)

If you enable the wings and spam Q with layered clothes on you will almost immediately experience FPS dropping.

I appreciate any staff members time looking into this a lot! Hopefully this can help!

4 Likes

This issue has been happening to me for a while and it’s very frustrating, my game has rainbow accessories that are parented to the player’s character, with the color of those accessories being updated by the client, if the player happens to be wearing layered clothing, it causes very noticeable lag spikes.

5 Likes

was debugging a strange lag spike while equipping / unequipping tools today and led to this known issue :raised_hands: would there be an ETA on when the fix will be rolled out? it would be quite unfortunate that we couldn’t enable layered clothing due to engine performance issue :sob:

3 Likes

I asked under another post relating to layered clothing and got this response.
Hopefully this gets prioritized more as it is a game breaking issue.

3 Likes

Thank youu so much for letting me know! :raised_hands: very glad to see the issue is being actively worked on

Besides the fps dropping issue, I was encountering another very strange issue about memory usage regarding the tools being updated / altered while the character is using layered clothings :man_bowing: not sure if you could share some thought / insight Thank youu in advance!

Currently the game of mine making use of remote event to simulate gun’s motion and effect (motor 6D bolt cycling animation / sounds, etc) and there was one time when a player using layered clothings firing their weapons caused my client’s LuaHeap memory usage to an insane value and thus crashed my client

However, seems that I couldn’t replicate the same situation again regarding the luaheap memory leak again so far

2 Likes