Search Unity

Platform switch freezes for larger projects

Discussion in 'Editor & General Support' started by olli-3dbear, Jun 8, 2018.

  1. olli-3dbear

    olli-3dbear

    Joined:
    Sep 14, 2016
    Posts:
    7
    I have a larger project I'm working on using Unity 2018.1.2f1 on the latest macOS. Cache server has been a huge help in getting multi-platform work done by a small team, but I'm lately running into a problem I haven't had before. After pressing Switch Platform, especially when switching to Android, the whole editor seems to freeze for a long time. Here's the Editor logs for the part I'm talking about:


    Refresh: detecting if any assets need to be imported or removed ... Refresh: elapses 0.375206 seconds (Nothing changed)
    Determining assets that need to be reimported for target platform ... Refreshing native plugins compatible for Editor in 3.25 ms, found 7 plugins.
    Fallback handler could not load library /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/libKernel32
    Fallback handler could not load library /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/libKernel32.dylib
    Fallback handler could not load library /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/libKernel32.so
    Fallback handler could not load library /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/libKernel32.bundle
    Fallback handler could not load library /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/Kernel32
    Fallback handler could not load library /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/libKernel32
    Fallback handler could not load library /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/libKernel32.dylib
    Fallback handler could not load library /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/libKernel32.so
    Fallback handler could not load library /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/libKernel32.bundle
    Fallback handler could not load library /Applications/Unity/Unity.app/Contents/Frameworks/Mono/lib/libKernel32
    Connect to CacheServer localhost:49510
    Disconnect from CacheServer
    12.924501 seconds.
    <Freeze here ~10 min>

    Hashing assets (0 files)...
    0.000 seconds
    file read: 0.000 seconds (0.000 MB)
    wait for write: 0.000 seconds (I/O thread blocked by consumer, aka CPU bound)
    wait for read: 0.000 seconds (CPUT thread waiting for I/O thread, aka disk bound)
    hash: 0.000 seconds

    Hashing assets (2412 files)...
    12.934 seconds
    file read: 5.982 seconds (8018.949 MB)
    wait for write: 5.878 seconds (I/O thread blocked by consumer, aka CPU bound)
    wait for read: 0.316 seconds (CPUT thread waiting for I/O thread, aka disk bound)
    hash: 12.003 seconds
    Connect to CacheServer localhost:49510
    Unloading 10961 Unused Serialized files (Serialized files now loaded: 0)
    System memory in use before: 0.79 GB.
    System memory in use after: 0.79 GB.

    Unloading 10930 unused Assets to reduce memory usage. Loaded Objects now: 10813.
    Total: 40.249345 ms (FindLiveObjects: 2.943888 ms CreateObjectMapping: 1.709117 ms MarkObjects: 32.366985 ms DeleteObjects: 3.228416 ms)

    Updating Assets/PostProcessing/Editor Resources/Monitors/VectorscopeCompute.compute - GUID: 45de9ff58691e934c9810dc23de2ba50...
    done. [Time: 155.041355 ms]
    Updating Assets/PostProcessing/Editor Resources/Monitors/HistogramCompute.compute - GUID: 51b7e4b4448c98f4a849081110fd6212...
    done. [Time: 11.579779 ms]
    Updating Assets/PostProcessing/Editor Resources/Monitors/WaveformCompute.compute - GUID: 9d9b886f7a8fe7b4baf56624c42e3420...
    done. [Time: 9.246134 ms]
    Updating Assets/PostProcessing/Resources/Shaders/EyeHistogram.compute - GUID: e213272ad8ff213409a6e13b5c26b4e4...
    done. [Time: 13.929882 ms]
    Unloading 81 Unused Serialized files (Serialized files now loaded: 0)
    System memory in use before: 431.2 MB.
    System memory in use after: 431.8 MB.

    Unloading 81 unused Assets to reduce memory usage. Loaded Objects now: 10476.
    Total: 27.996243 ms (FindLiveObjects: 2.004250 ms CreateObjectMapping: 0.307822 ms MarkObjects: 25.635115 ms DeleteObjects: 0.047975 ms)

    Disconnect from CacheServer
    Refreshing native plugins compatible for Editor in 16.71 ms, found 7 plugins.
    Preloading 2 native plugins for Editor in 1.76 ms.

    ----- Total AssetImport time: 533.444336s, AssetImport time: 2.050560s, Asset hashing: 12.934569s [7.83 GB, 619.962646 mb/s]
    ----- Cache Server detail: CacheServerIntegrate time: 2.000513s, CacheServer download: 10.961905s [2.61 GB, 244.088470 mb/s]
    ----- Cache Server detail: Total assets requested: 2412, Cached Assets: 2408, Not available: 0, Not supported: 4.
    ----- Cache Server detail: CacheMove: 1.767653s, CacheDelete: 0.000000s.

    What's happening here? Is this a bug or intended behaviour? How would I go about speeding up the process? If it's an inevitable part of switching platforms, could we increase logging and maybe even show a progress bar in the UI? It took me a few days until I realized that Unity hadn't frozen permanently, it's just a slow running silent process that I need to wait for.


    Also, if this is a bug, what's the best way of sending a bug report for a proprietary project with ~10GB assets?
     
  2. rich-brighton

    rich-brighton

    Unity Technologies

    Joined:
    Jun 13, 2016
    Posts:
    10
    Hi @olli-3dbear, when Unity freezes could you grab a sample from Activity Monitor and post it here, please? We should be able to see what it is exactly doing in this state. Can you also describe your network setup, such as the network connection type to the cache server and the machine it and its clients are running on?

    Thanks.
     
  3. hardcodednumber

    hardcodednumber

    Joined:
    May 26, 2014
    Posts:
    88
    I am still getting the same issue on 2018.1.3f1. I've noticed the same occurrence when building via jenkins and the command line.
     

    Attached Files: