The company's app is too slow to start faster and requires more
So I did the research.
Reduce the starting speed from 2000ms to about 800ms.
Record the speed-up method first
The logic code in application's OnCreate method is all used.
New Handler (). Post (New Runnable ()); parcel
The OnCreate () method of activity is so;
This method drags the execution of the code all the way to Onresumer.
3 and then in OnCreate Onresume method everything you think will hinder the startup speed of the method and code plus log printing information
Look at the picture
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/58/DD/wKioL1S_RTKgcWS1AAFPZs3lbvk220.jpg "title=" Qq20150121141402.png "alt=" Wkiol1s_rtkgcws1aafpzs3lbvk220.jpg "/>
Look at the click of Activitymanager he will print the time, just look at the print time before the log printed what information
Then determine if the code for the printed information will block the app's startup speed.
If it does, handler.post the code all new or new Thread off. But the order will have a succession,
Print down log and experience it slowly.
My app scans the database when it's started, but Newhandler new Thread is still running before the start time, which proves it will scan the database when it starts, and it's 100ms slower. So with new Handler.postdaley (), extended 90ms operation, found that the scanned module can be dragged to the print time to run, the app started after the view to start scanning the database, the speed has increased 100ms
reached about 800ms.
4. Also pay attention to the depth of the layout and try to simplify the layout.
Android boosts app startup speed