Moving Attachments with child ParticleEmitters causes long updateInvalidParts step

Reproduction Place File

AttachmentParticleEmitterTest.rbxl (52.6 KB)

Within ReplicatedFirst there are three test scripts.
TEST_AttachmentWithParticles is the simulation that shows the issue I’m seeing.
the other two scripts show tests without the Particles and one with Parts + Particles.

Run the place file and open up the MicroProfiler and go down to the Main/Render thread and see the large updateInvalidParts step.

Details

I ran into a very strange performance issue regarding moving Attachments (or Bones) with child ParticleEmitters.

In my case the particles are entirely disabled. I’m working on a rain simulation where I use Attachments to drop rain particles from as moving an attachment is typically much more performant than moving a BasePart.

However, I started noticing that, while moving only 20 attachments, I was getting nearly 1ms long updateInvalidParts calls, which is about 4x the simulation time.

I recreated this example in a BasePlate to test. In my test I create 100 Attachments and in those I add two ParticleEmitters. The emitters are disabled and perform no actions, although, it seems like that should not matter. In this simulation I move the Attachments to random CFrames around the origin. In this simulation I’m seeing a ~4ms updateInvalidParts step as shown in this screenshot.
RobloxStudioBeta_2IoVLYDJOZ

I then set up the exact same simulation, but this time without the ParticleEmitters. This test yielded exactly what I would expect in terms of performance, as shown here:
RobloxStudioBeta_9t92dJOaR2

I then tried this same simulation again, but this time instead of Attachments I used BaseParts. This yields a slightly larger update time than the Attachments without ParticleEmitters as expected, as shown here:
RobloxStudioBeta_S1qM2OUJRa

With the attachments I also tested them being parented in Terrain, a single BasePart and each one having their own BasePart, and with respect to the ParticleEmitter test, the result was nearly the same each time with a nearly ~4ms updateInvalidParts step.

System Specs:

OS: Windows 11
CPU: 13th Gen Intel i7-13700F
GPU: NVIDIA GeForce RTX 4080
CPU: 64GB DDR5 5600MHz

Also had a friend test this, he had the same issue (but with a better processor)
here are his specs and results:
image
His GPU: NVIDIA GeForce RTX 3070

Expected behavior

I would not expect an updateInvalidParts operation to run in this scenario. It seems like this should have no performance impact at all from the ParticleEmitters inside of the Attachments

4 Likes

bumperino frienderinos. Would really love to see some thoughts on this one.