Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Android application lagging on Profiling

Discussion in 'Editor & General Support' started by Liquicidize, Sep 1, 2018.

  1. Liquicidize

    Liquicidize

    Joined:
    Feb 23, 2018
    Posts:
    6
    I wanted to profile my application because it's FPS is unstable; but mostly it is above 30fps. Upon hitting the 'Record' button on the Profiler (targeting the Android device), the application seem to take a dip on FPS and eventually hang in the process. The Profiler does not contain enough, not even sure if its accurate, data to work with after this happens.

    Basic infos:
    • Device is a flagship so hardware is not a problem, atleast that's what I'm thinking
    • Application is 3D.
    • I built the Application with the Development Build and Autoconnect Profiler on.
    • Using Unity 2018.2.6f1
     
  2. alexeyzakharov

    alexeyzakharov

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    399
    Hi!
    Could you please attach a screenshot of profiler capture. Profiler has its own markers and those should be visible in hierarchy view. It is more likely the time of stats collection that takes time.

    As a workaround, in 2018.2 you can use https://github.com/Over17/UnitySystracePlugin to see Unity profiler samples in SysTrace data
     
  3. Liquicidize

    Liquicidize

    Joined:
    Feb 23, 2018
    Posts:
    6
    Sorry for the late reply.

    I can't reproduce the problem again. At the time I got frustrated and disabled Development Build and made the fps smooth 50-60fps. I'm trying it now with it on and the Profiler recording, it seems to behave correctly.

    I'll continue updating my app with the build settings as is and reply if it got weird again.
     
    alexeyzakharov likes this.
  4. Liquicidize

    Liquicidize

    Joined:
    Feb 23, 2018
    Posts:
    6
    Okay it's crashing again. This was the last frame before crashing. The spikes are caused by EarlyUpdate process.

    idk.JPG

    Application works fine when not in Development Build...
     
  5. alexeyzakharov

    alexeyzakharov

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    399
    Do you have adb log available? It might be that something went wrong with data streaming from device to the Editor.
    Can you please check if you use USB and not WiFi connection.
     
  6. Liquicidize

    Liquicidize

    Joined:
    Feb 23, 2018
    Posts:
    6
    Just switched back to Development build, it's working again properly again.

    It may be perhaps that the data stream is the problem, but then again it just happens randomly within the same connection... I'm not really into Android; where can I get/produce the adb log? I also am using USB connection. I didn't even know I can profile through WiFi. I might as well try that.

    Anyways, thanks for accommodating me. Appreciate the help!
     
unityunity