Search Unity

  1. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  2. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  3. Unity 2017.1 is now released.
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  6. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

Collaboration slows unity to a halt?

Discussion in 'Unity Collaborate' started by Premus, Mar 7, 2017.

  1. kblood

    kblood

    Joined:
    Jun 20, 2012
    Posts:
    50
    Well, I have the Windows firewall, that should be it. My router has a firewall as well, but both should use UPNP.
     
  2. kblood

    kblood

    Joined:
    Jun 20, 2012
    Posts:
    50
    I can share the project with you, I will begin opening it, so it is ready.. maybe.. when you PM me.

    I dont use any proxies.
     
  3. kblood

    kblood

    Joined:
    Jun 20, 2012
    Posts:
    50
    I also just noticed that there is a sort of loading bar on the Unity icon. It has a green color moving across it. I just timed it again, 4 minutes opening Unity, then a bit over 7 minutes with the Collab part. Well, close to 8 minutes.
     
  4. kblood

    kblood

    Joined:
    Jun 20, 2012
    Posts:
    50
    I mixed up some numbers. The build of the project is 1.5 gb, the project itself (with cache files) is 16 gb. Without cache files and meta data it is just below 10 gb.
     
  5. ixdeveloper

    ixdeveloper

    Joined:
    Jan 5, 2016
    Posts:
    2
    Ok,

    I think I might have found something.

    I fully support the description of having our project held "hostage" to Collaborate at times, since I have also had really long freezes on load for projects using Collaborate for the most of the duration of our five month project. It has been worse with some projects, notably those with a large number of assets.

    The last couple of days I noticed that during freeze, the disk load is reported to be at 100% on my computer, even though transfer rates are in the kilobytes. This happens exactly when I load a project that is linked to Collaborate.

    The load is not from Unity, however, but from the Windows Anti-malware executable.

    When temporarily disabling "real time protection" in Windows Defender, the freeze goes away and the project loads and the editor becomes responsive almost instantly.
    https://support.microsoft.com/sv-se/help/4027187/windows-turn-off-windows-defender-antivirus

    I'm not happy leaving the default real time protection off so I don't think this is a solution but if someone can verify it works for them too, it might be useful as a workaround for the time being, and also give some leads to what is happening ie the Unity editor working with files in a way that triggers a real time scan that creates some kind of lockup, possibly looking for a newly created file that is not yet possible to read or something like that.

    FWIW, this was tested using Unity 5.5.2f1 and Windows 10 Creators Update x64. But I've seen the exact same behaviour Before getting the Creator's update and also tried using 5.6.2 which was just as bad.
     
  6. kblood

    kblood

    Joined:
    Jun 20, 2012
    Posts:
    50
    I think I already tried that ixdeveloper, but I tried it again just in case. Even with Windows Defender turned off, my loading time is still about 10 minutes. I am trying to move the project to a MacBook Air now since it should have less loading time.
     
  7. kblood

    kblood

    Joined:
    Jun 20, 2012
    Posts:
    50
    Okay, so I think I got to the bottom of this. I copied the whole project to my SSD and opened it from it. First it was slow as usual, but I checked my active processes and noticed the anti-malware thing mentioned, so I deactivated that and the whole thing loaded within a minute, rather than the usual 10 minutes. But I also noticed that it was reading 300 MB per second for a few seconds while opening. Seems it actually read through EVERYTHING in the whole project. For some reason Unity seems to be capped at 25% of the disks possible read speed, but for the SSD that is a bit over 300mb per second. For my hard disk its about 40-50mb per second.

    Pretty sure that will shorten the lifespan of the SSD a bit if it does this every time, and at any rate, it should really not need to do this every time. I am pretty sure Unity already has faster ways of checking the project for changes.

    I hope this helps get to the bottom of what the problem is. Maybe make it standard that Unity does not expect changes to have happened while it was closed?
     
  8. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    2,389
    Don't worry about that. It takes about a petabyte of writes on a 256GB SSD before it's likely to fail completely :)

    It could either be that Unity uses access time rather than actual change time for the project directory to trigger a rescan (which would be wrong), or that the protection in the system changes last modified timestamps, technically making files "new".

    If Unity uses mere access time (reads) to decide when files need to be refreshed in version control and such, I consider that a very serious bug. It'll at least cost unnecessary upload/reimport time.
     
  9. kblood

    kblood

    Joined:
    Jun 20, 2012
    Posts:
    50
    A Petabyte gets much closer if at least once each day it gets more than 16gb data read just because you open the project. This is all on top of Windows booting, caching and loading other programs. Not that its likely to become a problem, especially if its mainly reads. I usually do try to use my hard disks for at least 5 years though.

    Either way though, it does not need to be done for no reason.
     
  10. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    460
    Hi @ixdeveloper! Have you tried leaving the realtime protection on but adding Unity Editor to Windows Defender's list of apps that it will let through to see if that still removes the freeze?
     
  11. kblood

    kblood

    Joined:
    Jun 20, 2012
    Posts:
    50
    I tested this. Adding the Unity Editor itself is not enough, you also have to add the project folder as part of the exception. First I tried with no exceptions and Windows Defender on. It took about 3-4 minutes to open my project, the reason it opens this fast is that I now put it on my SSD instead, but Windows Defender reads files about 40-70 mb per second while my project opens, especially when it checks for files changed due to using Collab, while Unity also uses pretty much the same amount of disk access.

    Then I tried with Unity and the Unity folder excluded but it still took a few minutes to open, same problem. So I tried disabling Windows Defender real time protection. Now it opens in about 1-2 minutes total. With Windows Defender active, the 3-4 minutes was mainly the part after Unity began with the file changes part, so it was probably 5 minutes total. So I excluded my whole project folder, and it now took the same 1-2 minutes to open the full project with Windows Defender active. But while checking for changes that one minute, Unity goes up to 200-350 mb per second of disk activity. So it seems to check every time you open the project for changes in every single file.