But from a user experience perspective, what do we care about when we use ourselves as users to play the application? If you are playing a mobile game and you don’t want to suddenly play and then don’t want to Kun, then the power and consumption flow is not too serious and finally, the installation package wants to be smaller. The simple classification is as follows:

Fast: avoid carton, fast response, reduce the user waiting time, meet the user’s expectations when using.

Stability: the user will not crash and slow response.

In fact, as a developer, there is a learning atmosphere and a communication circle, this is particularly important, pay attention to the author: ios advanced advanced open courses can be added I button skirts 3198….. 19 plus 749 to share the latest resources every day, welcome to 1-6 years of development

Save: save traffic and power consumption, reduce user costs, avoid burning the phone.

Small: The installation package reduces the installation cost.

A, the fast

Slow start, frequent use of cardboard boxes is very user experience and should be avoided. CATon has many scenarios, which can be divided into four categories: UI rendering, application launch, page skipping, and event response. Caton has many reasons, but the reasons and scenarios are all displayed on the screen to satisfy the user’s device. Ultimately, there is a problem.

According to the display principle of IOS system, we can see two reasons for the influence:

1. Drawing tasks are too heavy and it takes a long time to draw a frame.

2. The main thread is too busy. According to the VSYNC signal sent by the system, the data is not ready and the frame is lost.

This picture is taking too long. There are tools to help us find problems. The main thread of the main thread needs attention. Because the main tasks of the main thread are to handle user interaction, draw pixels on the screen, and load and display relevant data, it is particularly important to avoid any main thread so that the application can remain responsive to user actions. To sum up, the main line is mainly from the following aspects:

1.UI lifecycle control

2. System Event Handling

3. Message processing

4. Interface layout

5. Interface to draw

6. Interface to refresh

In addition, other processing in the main thread should be avoided as much as possible, especially for complex data calculations and network requests.

two The stability of the

The stability of applications is very extensive. There are many factors affecting the stability of memory, such as improper use of memory, improper consideration of code scenarios, unreasonable code logic, etc., all affect the stability of applications. The two most common cases are crashes and ANR. These two errors make the program unusable. More commonly used solutions are as follows:

1. Improve code quality. For example, during code development, you can see some code design logic, business rationale, and so on.

2. Code static scan tool. Common tools include Clan static analyzer, OCLint, FIDER, etc.

3. Collision monitoring. Record faults and exceptions in a timely manner, and track and analyze them.

4. Collision upload mechanism. After the crash, try to save the log to local first, then upload the log message and the next network is normal.

Retrial conscience

In mobile devices, batteries are so important that nothing can be done without them. For OS and device developers, power optimization doesn’t stop there, the pursuit of longer standby times, and for applications, it doesn’t neglect the use of power, especially those classified as “battery killers,” the end result of which is uninstall. Therefore, application developers need to minimize power consumption while implementing requirements.

1.CPU

The CPU is the main hardware used by the application, and the application still consumes CPU resources while operating and handling push notifications in the background, whether the user uses it directly or not.

The more you use, the more electricity you consume. Older generation devices consume more power to perform the same basic operations, and the amount of computation depends on different factors.

2. network

Intelligent network access management allows applications to respond faster and helps extend battery life. In the absence of entry