Search Unity

Long Delay Not Showing In Profiler

Discussion in 'Editor & General Support' started by mmkc, Mar 24, 2021.

  1. mmkc

    mmkc

    Joined:
    Sep 12, 2019
    Posts:
    49
    This is 2019.4.13f1.

    I'm troubleshooting a performance issue we are having where we:

    1. Disable the camera
    2. Unload the previous scene
    3. Download textures for the new scene
    4. Load the new scene
    5. Enable the camera
    6. Apply the downloaded textures

    The code does something like this:

    Code (CSharp):
    1.                
    2.                 EnableCamera();
    3.  
    4.                 Debug.Log("Camera enabled");
    5.  
    6.                 while (!_texturesDownloaded)
    7.                 {
    8.                     Debug.Log(DateTime.Now.ToLongTimeString() + ": Not downloaded yet");
    9.                     yield return null;
    10.                 }
    11.  
    12.                 Debug.Log(DateTime.Now.ToLongTimeString() + ": Downloaded");
    13.  
    In my logs I see:

    1:46:48 PM: Camera enabled
    1:46:49 PM: Not downloaded yet
    1:46:49 PM: Not downloaded yet
    1:46:49 PM: Not downloaded yet
    1:46:49 PM: Not downloaded yet
    1:46:49 PM: Not downloaded yet
    1:54:55 PM: Downloaded

    Notice that huge gap between the last "Not downloaded yet" and "Downloaded". Normally it's only 1 minute or so, but this was run using Deep Profiling in the editor which seemed to greatly increase the time. In the profiler however, I don't see any frames that are taking that long. The only "long" frame is ~500ms. Any idea where else I can be looking to see what could be causing the slowdown?
     
  2. mmkc

    mmkc

    Joined:
    Sep 12, 2019
    Posts:
    49
    Also, I did try upgrading to 2019.4.22f1 and I still see the issue.
     
  3. mmkc

    mmkc

    Joined:
    Sep 12, 2019
    Posts:
    49
    Sorry to bump this but it's a fairly large issue... do I submit a bug report for this?