Analyzing UI Performance with Systrace In this document Overview 简介 Generating a Trace  生成Systrace文件(html) Tracing on Android 4.3 and higher   4.3以上 Tracing on Android 4.2 and lower    4.2以下 graphical user interface               用工具生成Systrace 文件 Ana…
  android性能优化相关的开发工具有很多很多种,这里对如下六个工具做个简单的使用介绍,主要有Android开发者选项,分析具体耗时的Trace view,布局复杂度工具Hierarchy View,应用启动时间,Memory.CPU.Network分析,静态代码检查工具Lint以及程序稳定性monkey.下面就开始学习下这些工具吧. 一.Android开发者选项   Andorid开发工具众多,首先就是手机自带的开发者选项了,至于手机怎么启动开发者选项,那么请自行百度或者google了,接…
Performance Tips 1.In this document Avoid Creating Unnecessary Objects 避免多余的对象 Prefer Static Over Virtual  多用static方法,它比其它方法快15%-20% Use Static Final For Constants   多用 static final 基本类型常量 Avoid Internal Getters/Setters   在类内部避免使用getter,setter而直接使用成员…
Improving Your Code with lint 1.See Also lint (reference) Using Android Annotations In addition to testing that your Android application meets its functional requirements, it's important to ensure that your code has no structural problems. Poorly str…
Analyzing Network Traffic Data 1.This lesson teaches you to Analyze App Network Traffic Analyze Network Traffic Types In the previous section, you tagged your app code with traffic identifiers, ran tests, and collected data. This lesson teaches you h…
参考 http://blog.csdn.net/xiaanming/article/details/42396507 基本步骤: 1,准备一个有内存泄漏的代码 2,如何发现内存泄漏 3,生成.hprof 4,打开.hprof 文件开始分析 5,修复代码 1,准备一个有内存泄漏的代码 mport android.os.Bundle; import android.support.v7.app.AppCompatActivity; import java.util.ArrayList; public…
「为什么写」 一直想写数据库相关的文章,最直接的原因是数据库这块我们工作中每天都会用到,也是面试求职绕不开的话题,无论你是何种测试,优秀的数据库能力都会非常加分,最近我在总结数据库性能优化这块内容,性能这块就如庖丁解牛,首先你需要知道牛的全貌,筋脉布局,才能解之,今天这篇文章,也先从全局的角度来看数据库性能优化这件事. 「管中窥豹」 我们常常听到一句话,性能优化皆io,可以认为性能优化的核心思想就是减少io操作,之前和一同学聊天,发现不少人认为减少io就是减少磁盘操作,这其实很不全面,Cpu->…
一.概要: 本文主要以Android的渲染机制.UI优化.多线程的处理.缓存处理.电量优化以及代码规范等几方面来简述Android的性能优化 二.渲染机制的优化: 大多数用户感知到的卡顿等性能问题的最主要根源都是因为渲染性能. Android系统每隔16ms发出VSYNC信号,触发对UI进行渲染, 如果每次渲染都成功,这样就能够达到流畅的画面所需要的60fps,为了能够实现60fps,这意味着程序的大多数操作都必须在16ms内完成. 如果你的某个操作花费时间是24ms,系统在得到VSYNC信号的…