How to analyze stack trace info of a thread?

后端 未结 1 1700
半阙折子戏
半阙折子戏 2020-12-07 06:37

I\'m trying to monitor performance of my app;

When cpu usage overloads, I dump the stack trace of the suspicious thread and main thread as string by two libs: https:

相关标签:
1条回答
  • 2020-12-07 06:59

    Ohkay ! I somewhat got your problem. What is your app about,? I mean is it a Game or something.? With this very info, I'll give you few workarounds,

    • I would suggest you to thoroughly study the code and de-initialize all the resources which are not being used.
    • Check for how many static properties and global variables/properties you’re using and ask yourself are they even required ?
    • Also I would again suggest you to monitor your app with Instruments look very precisely when the memory bar is going high and when low [e.g. by opening what ViewController it eats up a lot, by closing what ViewController the memory bar goes down, is your app dependent on GPS coz in big applications like uber they do not update locations on didUpdateLocations rather they use other methods, like singletons / Timer / heartbeats etc,]
    • Plus if you wanna avoid all this manual work, go for NewRelic

    A small tutorial for that : link

    Post again for more, Would be happy to help. =)


    Here are some links : by using and combining them with firebase you'll be able to see events and logs as well, here's 1st -> watchdog

    here's the 2nd 1 -> Prints the filename, function name, line number and textual..etc..

    Now combine any of that with firebase and it'll send the logs to you directly.

    0 讨论(0)
提交回复
热议问题