简体   繁体   中英

Time Profiler - Wait for app launch

When launching my app from a custom URL scheme, when app is not backgrounded, the launch sequence is taking longer then I would like. I want to use time profiler to see what methods are taking so long. I know on run there is an option for "Wait for App Launch" so I can launch it using the URL, but I don't see that under the profiling scheme. Does anyone know a way that I can launch the app fresh, using the URL, and have time profiler running on launch?

"see what methods are taking so long"

Do you suppose some method (or a few) are sopping up a lot of CPU time in themselves or by calling other methods that do? If so, it will be easy to fix, but it's Not Likely.

More likely the time is spent in I/O of one sort or another, and you need to figure out why , not where .

If you're able to start it under a debugger (say by using @ChrisTruman's recommendation), then all you need to do is interrupt it with Ctrl-C, Ctrl-Break, Escape, or whatever key combination interrupts it. Do this during the time when, subjectively, it is slow.

Let's suppose the startup is taking three times longer than you think it should. If that's so, that means two thirds of the time is spent doing the unnecessary I/O or whatever it is. That means each time you interrupt it, the probability is 2/3 that you will catch it in the act of doing whatever causes the slowness. So interrupt it a few times, and each time just read the stack, look at variables, etc. You will see why it's being slow. Don't even look for where - that will appear by itself.

That's the basic idea behind this technique .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM