Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Scripting: Experimental support for incremental Garbage Collection to avoid GC Spikes

Discussion in '2019.1 Beta' started by julian-moschuering, Nov 7, 2018.

  1. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
    Hey,

    sounds great!
    Could you please give us some more information? It sounds like this is not yet the generational sgen GC but an improved boehm GC?

    Regards,
    Julian
     
  2. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
  3. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
  4. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Yes, this is Boehm running in incremental mode. You can now turn it on in Player settings form Mac/Windows/Linux Standalones as well as for iOS and Android builds. It should help reduce GC spikes. Feel free to test it and share feedback here! We will send out much more detailed information later.
     
    dadude123, Peter77 and hippocoder like this.
  5. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Is there a general performance overhead to using incremental GC?
     
    hippocoder likes this.
  6. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Yes, there is a certain overhead to writing reference types in managed data, as the GC needs to be informed about this. We believe that the overall results will be beneficial, but there may be corner cases where this overhead becomes noticeable.