Profiler EditorLoop with spikes of 50-80% and other problems

Hello everyone, how is it going?

My apologies if this is too dumb but, well I’m trying to optimize my project and I ran into some weird stuff, I’m gonna make a list in no order cuz I really don’t know what to do anymore.

Scene description: I have a scene with a skybox, a plane for the water and terrain for the player to walk on
I made some custom trees for this project and separated it into 2 meshes one for the leaves and another for the trunk both are using the URP Simple Lit Material with the GPU instancing disable, all marked as static and static shadowcaster.

1st problem: If I spawn them as objects on the terrain they enter into the static batching perfectly but if I paint them with the terrain tool the saved by batching remains at 0;

2nd problem: No matter the settings or pipeline nor timeline asset my editor do not run above 60FPS;

3rd problem: My profiler shows weird spikes of 50-80% on EditorLoop and when outside of the spikes I’m getting like 50%+ of semaphore.WaitForSignal, I’ve already double checked the VSync in the settings and in the play window, they bouth are turned down and my meshes are really simple not evan a 1500 tris per tree

The only 2 complicated shader that culd be causing this problem should be the water and skybox ones but the problem persist even with its object disabled and with the default skybox, and even with nothing being redered at all. I’ve disable the entire scene and left only 1 camera rendering nothing and it still throw this as the biggest slowdown 80% or so.

If you culd help me on it I would be glad, btw I’m using the recommended LTS version 2022.3.4f1

Cheers!

Why should it? It’s just going to consume more energy all the time. Nevertheless, you can probably change this in Preferences => General => Interaction Mode and set it to Monitor Refresh Rate.

Which is not all too unusual.

Either ignore those or profile a running build to get real-world performance results. Profiling within the editor will always show some editor overhead.

Ok, ty for your insights, but what about the rest ? Should I ignore the semaphore.WaitForSignal too? and the saved by batching remaining at 0?

WaitForSignal is not an issue in itself . As long as it doesn’t stand out in a build you can ignore it.

Batching only works if you render multiple objects using the same material, the shader needs to support it, and there are other conditions and it works differently in each render pipeline. I have no idea how any of these relate to terrain. You could check the Frame Debugger to see where within the rendering these objects are grouped, and whether they are getting batched.

ok, ty for your attention, I’m going to check them all