Packet size detection optimization strategy

16053895:

Packet size detection optimization strategy:

Use TinyPNG or WebP to optimize image resources
Use lint to detect useless code
AndResGuard, 7Zip compression, etc.

Android:https://github.com/wuba/Zucker
iOS:https://github.com/wuba/WBBlades
csdn参考: https://blog.csdn.net/Kibaco/article/details/128675330

Modularity, business module, functional feature

performance monitoring

Time-consuming startup:
https://juejin.cn/post/7236924717310967863

Through nimbledroid this tool

adb shell am start -S -R 10 -W com.example.app/.MainActivity
-S means to force stop before each startup, -R means to repeat the test times. Each time the output is as follows
: Stopping: com.example.app
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.app/.MainActivity }
Status: ok
Activity: com.example.app/.MainActivity
ThisTime: 1059
TotalTime: 1059
WaitTime: 1073
Complete

Cold start time: Cold start means that the user opens the application for the first time. At this time, the process has not yet been created, including the process of creating the Application. The cold start time refers to the time from when the user clicks the application icon in the Launcher for the first time to when all the content on the home page is displayed.

Hot start time: Hot start means that the user presses Back on the homepage, and the activity on the homepage has been destroyed, but the Application still exists in the memory, and the corresponding process has not been killed, excluding the Application creation process. The hot start time refers to the time from when the user clicks the desktop icon to when all the content on the home page is displayed while the Application still exists.

Stop cold start timing in onWindowFocusChanged()

Guess you like

Origin blog.csdn.net/adayabetter/article/details/131962657