Follow-up Plan performance optimization-diagnostics and tools (currently only about TraceView), performance optimization-memory, performance optimization--jni, performance optimization-electricity.
2, what is the performance problem
There are two concepts in performance testing:
(1). Response time
Refers to the time from the start of a user operation to the system giving the user correct feedback. Generally includes logic processing time + network transmission time + presentation time. Network transfer time is not included for non-network class applications.
Presentation time is the rendering time of the Web page or APP interface.
Response time is the most direct user experience of performance.
(2). TPS (Transaction Per Second)
TPS is the number of transactions processed per second and is the indicator of system throughput and is also measured in the search system with QPS (Query Per Second). TPS is generally counter-correlated with response time.
Generally speaking, the performance problem refers to the response time is too long, the system throughput is too low.
For background development, it is also common for high concurrency memory leaks to be attributed to performance issues.
For mobile development, performance issues include power, memory usage, and more special cases.
3, the Performance tuning method
Once you understand what a performance problem is, you can understand that performance optimization is actually optimizing the response time of the system and improving the TPS. Optimize response time and improve TPS. The way is the three main categories:
(1) Reduce execution time
Also includes several small categories
A. Using multi-threaded concurrency or distributed to improve TPS
B. cache (including object cache, IO cache, network cache, etc.)
C. Data structure and algorithm optimization
D. Better performance of the underlying interface calls, such as JNI implementations
E. Logical optimization
F. Demand optimization
(2) synchronous change asynchronous , using multithreading to improve TPS
(3) Early or delayed operation , peak error increase TPS
Performance Optimization Series General Chapter