Support Forum

Performance Check:: Am I missing something?

Hey, I am trying ALINE and so far great asset, really love it for debugging.
I would like some help debugging the performance of the example scene with the Heightmap.

Adding the example job in the documentation, tanks my FPS from 160 to under 60fps.

Is there any setting I need to change to get less of a drop? I am on unity 2022.2 and using latest ALINE from ASSET STORE.

Checking the profiler it seems most the latency is the actual job executing (pushing commands really).
I have a fairly decent CPU 3950X 16Cores and my GPU is 1080. I am assuming this should be fairly faster?

Am I out of luck? Or is there anything I could look up into?


Do you have a screenshot of the profiler output?

Here is a snapshot of the related methods (this has a massive overhead of running with DeepProfile).
This is the relevant code.

        var builder = DrawingManager.GetBuilder(true);


        // foreach (var chunk in SystemAPI.Query<ChunkDebugAspect>())
        // {
        //     var chunkWorldPosition = chunk.Coordinates * ChunkConfiguration.Size;
        //     var position = new float3(chunkWorldPosition.x, 0, chunkWorldPosition.y);
        //     builder.PushSetMatrix(Matrix4x4.TRS(position, Quaternion.identity,;

        //     builder.SolidCircleXZ(ChunkConfiguration.ChunkHalfSizeXZ, 0.5f,;

        //     builder.PopMatrix();
        // }

        for (var i = 0; i < 100 * 100; i++)
            builder.SolidCircleXZ(ChunkConfiguration.ChunkHalfSizeXZ, 0.5f,;


Without this I run at around 180FPS (empty scene). When I add this code , I get down to 50FPS-58FPS. It might be the case that there is nothing to be done here, but I struggle to realize why I would be CPU bottlenecked here - even though the usage is pretty low.


I was more thinking of a screenshot when you are not using deep profiling. When using deep profiling it will be extremely slow either way. 10 000 circles is still quite a bit.

For reference. On my computer, it takes about 0.12ms to run the drawing job (the one just pushing commands, not the one generating geometry for rendering) with burst (or about 48 clock cycles per circle) and about 10 times that when running on mono (480 clock cycles per circle). If you need performance, the key is to use burst.

In total, I get about 190 fps when running this in the editor (only game view visible) when using burst, and about 150 fps when not using burst.

Rendering all the 10 000 circles takes about 300k vertices (depends on view distance), which have to be dynamically generated every frame.

Out of curiosity what’s your specs on the machine, so I can have a ballpark on what to expect from mine.

This is a Intel® Core™ i9-9900K CPU @ 3.60GHz × 16. The number of cores is not relevant for this, though, as there is very little parallelism happening with only one command builder.