iphone 程序app性能优化,调试,注意

来源:互联网 发布:phpstorm js 报错 编辑:程序博客网 时间:2024/06/08 02:22

从wwdc 2010上的video看,性能测试工具能实现。视频来源 wwdc 2010 session 131 performance optimization on iphone os

1.avoidable spikes要避免内存上使用的脉冲,尽量平滑的使用内存。因为内存不足,系统将会关闭程序,所以,内存是否足够,取决于程序运行过程中内存波峰。

三个方法:

1)definition:individual brief allocations all present simultaneously

2)processing large quantities of data:break into independent batches

3)autorelease objects :reduce object lifttime

2. memory leaks

3.abandoned memory

4. lanuch wait second 启动时间优化,采用gcd

5. fps,table滑动的流畅性能。要达到60fps。可采用

1)cells 复用

-[UITableViewCell  initWithStyle:reuseIndetifier;]

-[UITableView dequeueReusableCellWithIdentifier:]

2)cells 里的控件保持 stay opaque/green即使时UILable。ios4将会为你保持blue background

6.产品上线后,通过itunes connect可以下载报告