“This is my 10th day of the November Gwen Challenge.The final text challenge in 2021”
preface
It’s all about performance tuning or being asked about it in an interview, so why do we do it? And what are the difficulties of performance optimization? What should be done at different stages throughout the project cycle? How to maintain the optimization effect for a long time? As an Android senior engineer or architect, we should not look at problems from a single perspective but learn to carefully consider from multiple dimensions, so as to have a more comprehensive understanding and solution to the problem! Here’s a look at some of the problems we might encounter in performance tuning from multiple perspectives.
What are the challenges of performance optimization
Difficulty 1: Poor performance
The first problem of performance optimization is the poor performance of APP itself, which can be seen from the application of APP’s own performance:
- The first kind of problem is that the user can feel intuitively, for example: APP starts slowly, gets stuck, loses frame and so on, the user will complain the mobile phone is too card for sure!
- The second problem is that although users do not intuitively feel, such as: high memory occupancy, frequent jitter, but this hidden problem may lead to memory overflow, thus affecting the normal operation of the program
- Other performance problems include application power consumption, slow network requests, and high crash and exception rates
Among them, the collapse rate and outlier rate belong to the category of stability, and the collapse rate is easier to understand, and attention should be paid to the application of outlier rate. Abnormality refers to that the APP cannot respond normally. For example, when we click a button, it does not correctly jump to the next interface. At this time, the APP does not crash, but it is also unavailable, bringing very bad user experience.
Difficulty 2: Online problems cannot be checked
Online problem checking is a tuo brain (FA) problem for many Android programmers. Here is the main difficulty of online problem checking!
The first problem of performance optimization is that there is no way to troubleshoot online problems, which is from the perspective of troubleshooting problems. In popular terms, how can we ensure high abnormal sensitivity when there is an anomaly on the delay line?
When we launched a new version or launched a new feature no user feedback, we can also never thought has successfully launched, because only depends on the user feedback the single channel is very easy to miss anomaly in the first place, wait for the loss caused by users unbearable to feedback is too big, and it also has missed the best processing time.
The second difficulty of online troubleshooting: how to recover the crime scene, assuming users give us feedback but we can’t be too happy at this point. Feedback from users does not necessarily mean that we can reproduce. Many problems do not occur to all users. Users who have such special problems may use special devices or their accounts are in a specific abnormal state. When we use our own equipment and account in the company to reproduce his problem, it is very likely that we cannot reproduce it because of insufficient conditions. Naturally, there is no quick solution.
The third difficulty of online problems is how to fix them quickly and successfully. For online problems, time means life must be fixed as soon as possible. After we fix it, we usually open up some small traffic users or find specific users to test it just to be safe. However, if our method is to continuously install users and then wait for the result, such a solution is too long, and users will be a little disgusted after many times, and ultimately may not find users to cooperate with you.
Difficulty 3: Performance optimization costs a lot in the long run
The third difficulty with performance optimization, from the perspective of a team manager, is that performance optimization is expensive in the long run. If we had to spend a lot of effort tracking performance issues in each release, the team would be very resource-intensive in the long run and the team would produce less, so we would have to figure out how to nip problems in the bud and fix them as much as possible before they went live.
Performance optimization of long-term spending big difficulty is that the effect of performance optimization will not be able to get to keep for a long time, we finished the program after the optimization, if no measures are likely in the next version will once again to the destruction of, or we need to optimize performance problems, such long-term repetition will certainly lead to overhead.
conclusion
Through the difficulties encountered in the performance optimization work mentioned above, we can easily summarize our requirements for performance optimization indicators backwards:
- Good performance
- Online problems are easy to troubleshoot
- Low long-term input costs