When there’s a large quantity of skinned meshes (~100) in the game world, the creation & deletion of parts causes considerable frame lag. One example of where this can occur is with skinned seas in naval games, as a large number of skinned meshes are required.
Steps to reproduce:
- Generate a large number (e.g. 100) of skinned meshparts in workspace.
- Generate parts and delete them rapidly.
These parts can be parented anywhere in Workspace and will still generate lag. The rate of creation does not matter, but a higher rate will allow you to see the lag more easily.
The frame lag only occurs in live games, and not in Play Solo.
It seems the best way to reproduce this lag is to generate the skinned meshes on the client.
Repro place file:
skinnedmesh_bug_repro.rbxl (35.0 KB)
In the repro place, the green button will generate parts rapidly. The red button will toggle the skinned meshes invisible, mitigating most of the lag.
CPU: Intel Core i9-10850k @ 3.6GHz
GPU: MSI GeForce RTX 3080
This bug does not occur on MacOS or the Windows 10 App.
Before the 6th of October, this would not have caused any issues. The creation of deletion of parts would not cause lag spikes. No code was changed before and after this bug started appearing, so we know it arrived with the latest Roblox update.
Considerable frame lag seems to come from ‘updateInvalidatedFastClusters’, which can be seen in the screenshot and microprofiler dump attached below:
microprofile-20211007-003139.html (6.3 MB)
The lag is proportional to the number of skinned meshes present.
This makes games with large quantities of skinned meshes unplayable, as any creation or deletion of geometry will cause considerable frame lag.
Issue Area: Engine
Issue Type: Performance
Date First Experienced: 2021-10-06 22:05:00 (+01:00)
Date Last Experienced: 2021-10-07 03:10:00 (+01:00)