FPS drop when spawn a big BP, but FPS get very high after few spawn

Hi !

I’ve made a big BP within there is 20-30 static meshes (trees in voxel graphisms, with no texture),

When i spawn 1 BP, there is a big spike on the stat unit graph, wich don’t go back to normal.

And then, every time i spawn a new BP, the same spike happens, and add itself to the previous spikes.

I can spawn BP until 6-7, and, at 7th one, FPS go down to 25FPS (instead of 144FPS normally), so really bad performance.

BUT, when i spawn the 8th BP, there is a HUGE fps gain and i come back to 144FPS. No more spike, no more bad performance.

But all the BP are still present in the persistent level, and i can spawn more BP with almost no cost (fps just slightly decrease but not noticeable)

(I’ve made a graphic to help you understand my problem)

I found out something, but i still dont know, and how to fix it, but shadows are appearing when the spikes goes down.

Something’s updating the shadows at the same time that the FPS goes back to normal.

So, why it is happening ? How can i make the first spawn to be as performant as the 8th+ ones ?

(The spawning node is just a “Spawn Actor from Class”, nothing more)

The spawned BP is just a ground mesh, with trees pack child actor, all set in Static

image

Thanks a lot for your help !

I think the engine is instancing those static meshes when it detects you’re reusing a lot of them.
Take a look at this

Not all heroes wear capes, you were right !

I didn’t knew about the instances, i was doing so wrong with all these static meshes spawned.

Thanks a lot !

Glad I could help.