简体   繁体   中英

Will my app be slow on a device if it's slow on my Android Studio emulator?

This is probably a stupid question...but being a novice app builder I'd like someone to shed some light on this topic.

My Nexus S emulator on Android Studio is exceedingly slow - much slower than my Nexus 10 emulator, and slow enough that it lags when I try and navigate through my app.

Is this lag purely confined to this emulator and it's the emulator itself that is slowing the app down? Or when I release my app on the Play Store, will it be slower there too?

Thanks for the help.

-A

Is this lag purely confined to this emulator and it's the emulator itself that is slowing the app down?

May be, may be not. The performance of your app running on emulator depends on the emulator type, PC configuration and app itself. Depending on the type of emulator your choose and the PC configuration, the speed would vary. You might also see that other System app are terribly slow too.

Trying to gauge performance based on it wouldn't be a great idea. However you can run your app on real device and measure the app's performance using profiling tools, to determine the performance. These profiling tools provide realtime data for your app's CPU, memory, and network activity. You can monitor the critical path/high battery or memory usage and so on.

In order to provide faster and smoother user experience and preserving device battery life, you can do CPU profiling by using CPU profiler . Latest versions of Android Studio have built in tool to perform this.

You can refer to official document which provides guide to perform performance measure.

Will my app be slow on a device if it's slow on my Android Studio emulator?

It depends.

Android Studio and emulator use a lot of RAM.

Ex: 2GB RAM computer is not enough for Android Studio and emulator to work smoothly.

You should use real devices to test. If it has lags on real devices too, you are probably doing too much on UI thread. Then you should read more about thread control to make your app work smoothly

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM