如何在iPhone App上找到100%CPU使用率的原因 [英] How to find the cause of a 100% CPU usage on an iPhone App

查看:1092
本文介绍了如何在iPhone App上找到100%CPU使用率的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用程序中诊断出一个奇怪的行为:大约10分钟后,CPU使用率达到100%。应用程序中没有泄漏,并且在应用程序什么都不做的时候会发生泄漏。

I've diagnosed a strange behavior in an app : after 10 minutes or so, the CPU usage goes to 100%. There's no leak in the app, and it happens while the app is doing nothing.

我可以使用Time Profiler对仪器进行分析,但有没有办法找出实际原因是什么?

I can profile this with instruments using the "Time Profiler", but is there a way to find what the actual cause is ?

推荐答案

使用Instruments(Time Profiler)进行性能分析时,看看使用的方法是什么大部分CPU时间。跟踪回调以查看原因。

When profiling with Instruments (Time Profiler), look to see what method is using the majority of CPU time. Trace the calls back to see why.

这篇关于如何在iPhone App上找到100%CPU使用率的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆