Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

'Master' has worse performance than 'Release'

Discussion in 'Windows' started by GarthSmith, Dec 31, 2015.

  1. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    Hello!

    We have noticed that we get much worse performance on MASTER than we do on RELEASE. I have tracked it down to the .NET Native check box in Visual Studio. Unchecking this box increases our performance, however we then fail the Supported APIs test in WACK. Using Unity 5.3.1p1.

    NetNative.png

    I think it's related to LoadSceneAsync which we use heavily on our game map. I will report a bug tomorrow with an included project and more info if I cannot find a workaround tonight!
     
    MrEsquire likes this.
  2. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    Case 758243. Seems strange to me that I can get good performance on Windows Phone, but that I have to make performance worse in order to pass WACK. Our map hangs for seconds or minutes at a time.
     
    Last edited: Jan 4, 2016
  3. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    Can you show the WACK error?
    You are not the first one to get worse performance using .NET Native, this is being investigated.
     
  4. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    Hello @Aurimas Cernius !

    I included this screenshot with Case 758243. It fails the "Supported API test".

    This is caused when we disable .NET Native compilation. But it also makes our map perform better!

    Let me know if you need anything else. Thanks!
    WackResult.png
     
    Last edited: Jan 4, 2016
  5. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    Which vearsion of WACJ are you using? Make sure it is a newest one.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,645
    You will not be able to pass WACK with .NET Native disabled. Those APIs are used by .NET when you're not using .NET native, so the only way to make it pass WACK is to enable .NET native.
     
  7. HaakonL

    HaakonL

    Joined:
    Mar 13, 2014
    Posts:
    123
    ... so when will Unity fix the core to make Master builds perform as good as or better than Release builds?
     
    MrEsquire likes this.
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,645
    Look, this was reported just very recently, and most of us were on vacation before yesterday. We'll get there.
     
  9. HaakonL

    HaakonL

    Joined:
    Mar 13, 2014
    Posts:
    123
    Well, it sounded like you "closed" this thread by concluding that we have to use Master to pass WACK, and that was it. I'm glad you still consider it a bug that Master has worse performance than Release.

    However, I find it appropriate to ask when you will have the fix ready, since this affects all submissions to the store. Just like the issue with flickering textures that was fixed on iOS several months ago and now suddenly appear in Windows builds.
     
  10. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    @HaakonL, you can roll back to Unity 5.2 for the texture issue. If you're close to publishing I would avoid new versions of Unity or any other kind of middleware just as a general rule.

    EDIT: Reading your posts your deadline is close and you're already on Unity 5.3! Godspeed, good luck, and program hard! :eek::mad:
     
    Last edited: Jan 5, 2016
  11. HaakonL

    HaakonL

    Joined:
    Mar 13, 2014
    Posts:
    123
    :) @Garth Smith - thanks, I'll test 5.2, I don't think we're bound to 5.3. Maybe 5.2 has better performance as well...
     
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,645
    Hi,

    I just finished looking at one bug report related to master being slower than release due to .NET native.

    It was related to Daikon Forge: it has some incredibly naive implementations of reflection methods which are missing on .NET scripting backend, and it was querying method properties hundreds of thousands of times every time GUI was interacted with. Reflection is inherently slower on .NET native since they seem to read data from metadata every time you ask for it.

    Are any of you using it by any chance?

    @Garth Smith, the bug number that you reported on this thread doesn't seem to have a repro project, but I remember you saying in another thread that you have uploaded your project with another bug report. Could I have the case number?