About the optimization of Android App, from the first plan to the end of the series of articles on memory optimization, I have written fifteen or sixteen related blog posts in nearly three months unconsciously, which is a systematization of my knowledge and I hope to give you some help.

Here is a summary of this.

route

The Android App to optimize

1, How to optimize App performance

In the beginning of the series, we talked about one of the reasons for the series, and one of the plans at that time, and the series basically went in this direction.

2, Performance analysis tool

This article introduces some common performance analysis tools, including official, third party, memory analysis, UI analysis, execution time performance analysis, and so on.

There is also a sidebar on tool use –adb use

3. Optimized App startup speed

The first real hands-on optimization project, App startup speed optimization. There is actually a small series here, and in order to make things more clear, an additional translation has been added — an analysis of the startup process of the Application, followed by theoretical and practical challenges to startup speed optimization.

4, How do Layout place

This paper introduces the tool of Layout analysis and illustrates its use with an example. Some suggestions about Layout optimization are put forward.

5, ANR,

From the concept of ANR, the cause of ANR, how to avoid ANR these angles to “analyze” ANR. It also provides the method of analyzing ANR, and deeply analyzes the cause of ANR concentration and its solution.

6.Eliminate the caton

Explains the causes of the lag, and introduces a tool example to analyze how to avoid the lag.

7, Memory optimization

This is a large subset, divided into five pieces, including:

7.1 Garbage collection basics – GC stuff

Simple analysis of GC mechanism, aiming to let everyone have a theoretical basis for garbage collection, GC Roots, live objects, dead objects and so on have a concept.

7.2 How does Android manage App memory

Based on Android VM, the memory limit of Android App, memory management mechanism when App switch, process priority and so on are explained.

7.3 Memory analysis tool details

A series of memory analysis tools are introduced.

7.4 A memory leak code is used as an example to explain the process of analyzing memory problems

Based on the memory analysis tool in the previous part, an example of memory leakage code was analyzed to find out the cause of memory leakage. Such a process is actually a practice of tool use based on the previous theory.

7.5 Summary of memory usage

A summary of the memory optimization series, with an overview of common memory leak machine solutions, memory usage, and so on.

Focus on the analysis and resolution of memory leaks has a description.

8.Save electricity

Electricity usage optimization is a less concerned optimization, or to start with tools, introduces the analysis of electricity usage, and gives common electricity consumption items and optimization scheme.

9, Efficient network request

From the impact of network traffic on users, the analysis of App network and various network optimization schemes are introduced.

For the use of network caching, the MVP architecture Github client’s network caching section is referenced.

instructions

As mentioned at the beginning of the series, this series can be considered a performance optimization note based on an actual online App. Not App optimization, even in terms of performance optimization alone, this series does not cover everything.

App optimization is a continuous work that requires our constant attention.

In fact, focusing on code quality is also an aspect of App optimization.

conclusion

As usual, add a conclusion, is a summary of their own, some things also hope to share out everyone.

First of all, for writing, the attitude is relatively serious, always think that, after all, the external transmission of knowledge, the content may be less, but do not want to make mistakes. Hope I didn’t take you to the pit ~~ haha.

And then, actually all the time, teach them to fish. The important thing is to teach the method, so you can see that a lot of this series is about the use of some tools, combined with case studies. Not just laying out how performance optimization should be done balabala, one, two, three, four, five, six.

And then, not without theory. As the so-called “know what you are, know why you are”, several theoretical articles are introduced as a link, in order to enable people to deepen their understanding of tool use and analysis process on the same theoretical basis.

Finally, the above points are actually nonsense, everyone just like it.

Mutual encouragement to learn knowledge, know what it is to know what it is to speak knowledge, teach it to fish rather than fish