5.4.2 CompositeEditorPrimitives and PopulateDepth causing major performance issues

I’ve been working in a project for the past couple weeks without issue, however starting a couple days ago I began to have issues where my performance would tank significantly on certain scenes. They are relatively empty, its is just floor with a character and some lights.

The strange thing is nothing has really changed in project settings or even materially/scene wise. Given it was associated with a spiked GPU cost, I ran a ProfileGPU and noticed it was related to CompositeEditorPrimitives > PopulateDepth, ranging anywhere from 20-40ms in cost.

I can’t seem to find anything related to this on the internet. One thing I noticed is it tends to happen reliably when switching to full screen mode, and sometimes if I get too close to the character. Otherwise though it can also happen by just loading the level.

Any idea what it could be?

Yeah, I found something wrong with the editor primitives too.

I opened an empty level and used Render Resources Viewer to see how much VRAM it will take. Surprisingly the Editor.PrimitivesDepth and Editor.PrimitivesColor will take about 250 MB VRAM, even though the scene is completely empty!

In my real project, Editor.PrimitivesDepth takes up to 2GB VRAM! That’s incredible!