Search Unity

Bug JobHandle.ScheduleBatchedJobs Causing Huge Stalls (2019.4 LTS)

Discussion in 'Entity Component System' started by fholm, Aug 13, 2020.

  1. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    I've recently ran into an issue with calling ScheduleBatchedJobs, where the invocation of the function itself takes several milliseconds. See screenshot:

    upload_2020-8-13_12-37-27.png

    The section being profiled simply looks like this:

    Code (CSharp):
    1.    
    2. Profiler.BeginSample("JobHandle.ScheduleBatchedJobs");
    3. JobHandle.ScheduleBatchedJobs();
    4. Profiler.EndSample();
    5.  
    This is only presenting on an android device. I have not been able to reproduce it on Windows, OS X or iOS.

    The screenshot above is running the following:
    1) Unity 2019.4.6f1
    2) Motorola G8 Power phone (but it happens on others android phones also)
    3) IL2CPP release build.

    I never saw this behavior running on 2018.4 LTS. ATM this makes the job system completely useless for us, the stall does not happen every time, but i'd say maybe one call every few seconds presents with this issue. Largest stall I ever saw was ~40ms.
     
    hoshos and Vincenzo like this.