Search Unity

LWRP constantly creating several KB of garbage per frame

Discussion in 'Universal Render Pipeline' started by SVC-Games, Jun 6, 2019.

  1. SVC-Games

    SVC-Games

    Joined:
    May 21, 2013
    Posts:
    112
    So I was profiling a test project and noticed GC Allocs on "RenderPipelineManager.DoRenderLoop_Internal()"

    Just to be sure I created a new LWRP project (Unity 2019.1.5) and just run the Sample Scene. And yes, I'm having 3.6 KB of garbage generated every frame.

    Furthermore "ScriptableRuntimeReflectionSystemWrapper.Internal_ScriptableRuntimeReflectionSystemWrapper_TickRealtimeProbes()" is generating 40 B per frame.

    And sure enough, spikes ocur every now and then... Again, this is a brand new project, running the Sample Scene.

    I assume this is a bug of LWRP? For something that is "production ready" this seems like an issue...
     
  2. SVC-Games

    SVC-Games

    Joined:
    May 21, 2013
    Posts:
    112
    Here's a screenshot of the profiler:

    GC Alloc LWRP.JPG

    As you can see it's definetly a LWRP problem. It doesn't seem to be much, but just in a few seconds you end up with MB of garbage which will prompt the GC collector and stuttering
     
  3. minearjade

    minearjade

    Joined:
    Sep 29, 2017
    Posts:
    2
    Can confirm, this is a headache.
     
    SVC-Games likes this.
  4. rob_unity7

    rob_unity7

    Joined:
    Feb 8, 2019
    Posts:
    34
    I'm finding this too. only 1.5kb but its enough to cause stutters in webgl :(
     
    Last edited: Sep 17, 2019
    SVC-Games likes this.
  5. rob_unity7

    rob_unity7

    Joined:
    Feb 8, 2019
    Posts:
    34
    What version of SRP and LWRP are you using?
     
  6. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    110
    I think they fixed this in LWRP 7.0+ version, mostly.
     
    rob_unity7 likes this.