Search Unity

Unity 2019.3.0f5 Enter playmode is a lot slower than f3

Discussion in '2019.3 Beta' started by mahdi_jeddi, Jan 21, 2020.

  1. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    59
    After we updated to Unity 2019.3.0f5 the enter playmode got a lot slower. We're using the new playmode settings to not reload domain and scene. On f3 the game would've played almost instantaneously but now we're gonna have to wait 5-6 seconds to play the game. I actually opened the game on the f3 again to make sure I didn't change anything in the project that could do this.

    My guess is that it's because of the new change in sprite atlases that removed the storedHash that would've changed if it's built on different machines and would've cause problems when using a source control. This is what I'm getting in the profiler when using it to profile the Editor itself:

    3ed916a4748e06425a7b85b0d90aee7a.png
    We have a lot of sprites so this makes sense to have a little bit of loading at the start, but that big EnterPlayMode pause isn't there when we're loading the game on f3.
    Does anyone else have this problem? I'm trying to see if I can reproduce this in a small project and file a bug report.
     
  2. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    243
    @mahdi_jeddi Since 2019.3.0f5 storedHash is stored in SpriteAtlasDatabase for each Atlas and is still being used for tracking. So functionally remains the same.

    However will take a look at this issue asap and update this thread soon. Thanks for reporting.
     
    Lars-Steenhoff and Peter77 like this.
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    4,457
  4. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    59
    @Venkify Thanks. I tried a lot in the past few days to reproduce it in a small project. But it seems that it depends on the size of the sprite atlases more than the number of them. So I would have to make a big project to make it reproducible. I got it once with lots of atlases which had lots of sprites in them, so it's definitely a problem in sprite atlases.
     
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,828
    Looks like we were able to reproduce this internally. A current workaround would be to switch to ADBv1.
     
    phobos2077 and Peter77 like this.
  6. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    818
    Can you always switch between ADB 1 and 2 without losing anything?
     
  7. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    59
    Switching to ADBv1 didn't change anything for me. Still getting 6+ seconds of stall when entering the playmode.
     
  8. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,828
    In that case it might be a separate issue after all. Does it just depend on the size of the included atlases or are there other conditions to trigger the behaviour as well?
     
  9. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    59
    I tried to reduce it to a specific thing but wasn't successful. I'll try again today to reproduce it and send a bug report.
     
    LeonhardP likes this.
  10. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    59
    I couldn't reproduce it again so I sent an empty bug report to get a cloud access to upload the whole project. I'll update this post when I send the whole project.
    Case: 1214782
     
unityunity