Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

GC.Collect() 4.8ms self ms and time ms -- issue?

Discussion in 'Developer Preview Archive' started by hippocoder, Dec 25, 2011.

  1. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hi,

    I made a completely empty new scene with no scripts attached or anything, and it is spiking on the profiler at 4.6ms regularly with garbage collector. This isn't happening in 3.42. What is the problem?
     
  2. kerters

    kerters

    Joined:
    May 13, 2011
    Posts:
    164
    noticed a similar result on osx 10.6.8.
    and if i update a project to 3.5, vsync is enabled which snacks about 60% of the performance in playmode.
    the other new features are great fun to test and seem to work, thanks!
     
  3. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    It's the profiler itself that is causing the GC spikes. Unity are not doing any caching with string pools for the profiler so what you are seeing is the GC collection stats for all of the string labels in the profiler :(

    UT pan to address this at *some stage* in the future.
     
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Ah, harmless then. Thanks! Didn't notice it in 3.42 though, or maybe it's my imagination.