Search Unity

Bug After upgrade, CPU spikes much bigger in build than in editor

Discussion in 'Burst' started by gecko, Oct 19, 2022.

  1. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    We upgraded our project from 2019.4 to 2020.3 recently, and since then have been getting large CPU spikes on Vegetation Studio Pro when running around the game map. On BIRP, not SRP That was with Burst 1.6.6,Collections1.4.0,Jobs: 0.70.0-preview.7, andMath: 1.2.1.

    Then I upgraded to Burst 1.8.0-pre.2, Collections 1.4.0, and Mathematics 1.2.1, no help. I updated Visual Studio 2019, no help....

    What's so weird is that these spikes appear in the profiler when running in the editor, but they're only 20-25ms, but in builds, they are 200-250ms. Usually CPU load/spikes are smaller in builds than in the editor, but here it's the dramatic opposite.

    Any suggestions for what to try to reduce these spikes?

    thanks
    Dave
     
  2. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    So, after many hours of investigation, I finally figured this out. Somehow the top two toggles on Burst AOT Settings (in Project Settings) had gotten toggled off....maybe from the upgrade from 2019 to 2020? Or when I removed the packages before reinstalling/upgrading them during that upgrade? Dunno, but I wasted a lot of time before stumbling upon those settings. So if anyone is having bad lag spikes from VSP in builds but not in the editor, make sure these two toggles are enabled! D'oh!
     
    laurentlavigne likes this.
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    That's good to know, I'll add that to my pre-flight checklist.