性能优化检测Instruments-time profile的使用
来源:互联网 发布:ubuntu 关闭swap 编辑:程序博客网 时间:2024/05/16 15:15
使用Instruments中的time profile工具分析项目中的代码执行时间,找出导致程序运行慢的原因,即耗时的操作代码。
打开Instruments(注意:需要先打开要检测的项目文件,然后Xcode的菜单栏中选择打开Instruments)
方法1:
方法2:
选择time profile工具,并打开
运行查看(注意:选项配置)
(1)Separate by Thread:按线程分开进行分析。容易找出消耗资源的问题线程,特别是对于主线程,因为主线程要处理和渲染所有的接口数据及UI视图,当主线程受到阻塞性操作,一定会造成程序的卡顿,或停止响应。
(2)Invert Call Tree:反向显示调用树。把调用层级最深的方法显示在最上面,容易找到最耗时的操作。
(3)Hide System Libraries:隐藏缺失的符号。把干扰信息屏蔽掉,即把列表中因为系统架构,或DSYM文件缺失造成奇怪的十六进制的数值。
(4)Flatten Recursion:拼合递归。把同一递归函数产生的多条堆栈合并为一条。
(5)Top Functions:找到最耗时的函数或方法。
查看源码
0 0
- 性能优化检测Instruments-time profile的使用
- Mac 性能优化Instruments之Time Profiler
- iOS性能优化:Instruments使用
- Instruments 检测内存的使用
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- iOS性能优化:Instruments使用实战
- Oracle函数(数值函数)
- 不够位数的在前面补0,保留num的长度位数字
- angularJs解决手机端敲空格的时候,出现div问题
- IOT:Azure IOT初试
- k近邻 - 改进约会网站的匹配效果
- 性能优化检测Instruments-time profile的使用
- 运算符重载
- ZOJ - 3705 A - Applications
- QMetaObject::invokeMethod and Q_INVOKABLE
- 高斯模糊Android
- 深度学习的过往
- 简单的读取xml文件
- redis安装、设置密码及开机自启动
- 爬取豆瓣图片链接(Java)