Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why material designed app is slower than legacy holo designed app

My legacy holo app used to start up very fast.

Recently, I spend 1 year part-time, to port the holo app, to material designed app. Here's some significant changes which I had done.

  1. From API 21 to API 23
  2. From ActionBarSherlock to AppCompat Toolbar support library
  3. From support library v4:22.1.1 to v4:23.2.1
  4. Final compiled APK size changed from 4~5 MB to 5~6 MB.

One of the problem I'm facing right now is slow startup speed of my material designed app. It is significant slower (more than 2 seconds) than my holo designed app.

Fast start up speed for holo app

https://youtu.be/NguClpd6rG0

Slow start up speed for material designed app

https://youtu.be/TdnlZey0ABM

Note, before launching the app, I had ensure I kill the process (By going Settings -> App -> Force Stop) upfront.

As you can see from the video, once I tap on the icon, the ActionBar for the holo app is immediately shown. Where as, for material designed app, you need to wait around 2 to 3 seconds, only the Toolbar will become visible.

At first, I want to use TraceView to debug and root cause of the slowness. However, I realize TraceView can only be used on the app which is already started.

I had confirmed I don't perform any time consuming task in my Application, Activity and Fragment. Since both of my holo app & material designed app share the same logic code, I can't figure out the reason why my material designed app is slower.

Have anyone of you face the same problem? I was wondering, is there any good way for me to track down the root cause?

like image 379
Cheok Yan Cheng Avatar asked Apr 21 '16 10:04

Cheok Yan Cheng


People also ask

Why should I use Material Design?

Material Design was built on a mobile-first sensibility, which makes sense considering its original purpose was for designing Android apps. It also promotes animation in designs, both for user feedback and to hint at how different features function.

Is Material Design still a thing?

Material design is still growing, updating, and changing – just last year, Google made their language easier for designers to customise.

Is Material Design only for mobile?

In short, Material Design provides standards for designing UI and UX for applications across desktop, browser and mobile devices. More than that, however, Material Design is a visual design language that synthesizes classic design principles with the innovation and possibility of science and technology.

What is the use of Material Design in Android?

Material design is a comprehensive guide for visual, motion, and interaction design across platforms and devices. To use material design in your Android apps, follow the guidelines defined in the material design specification and use the new components and styles available in the material design support library.


1 Answers

This is false negative! As commented by @MarkKeen and @Nilabja, this is probably caused by new Android Studio 2.0. (In previous version of Android Studio, I didn't encounter this problem)

I'm using Android Studio 2.0.

Although I launch the app by tapping on icon, the app is uploaded via green play button in Android Studio. If I rebuild the APK in release mode, with signed key, and 3 seconds white screen doesn't appear. It has on-par speed with previous holo app.

like image 81
Cheok Yan Cheng Avatar answered Oct 10 '22 08:10

Cheok Yan Cheng