Joke Collection Website - Joke collection - Why is Android slower than Apple?

Why is Android slower than Apple?

Although the configuration of many Android phones is higher than that of iPhone, for example, the memory of most Andorid phones is 1GB, while that of iPhone 4S is only 5 12MB, but everyone who has used iPhone knows that Android phones always feel less smooth when used. Why is this happening?

The reason why Android is not as smooth as iOS is not that Java GC caused the pause, nor that Android runs Java compiled bytecode, but that iOS runs native code. The fundamental reason is that the UI rendering of iOS adopts real-time priority, while the UI rendering of Android follows the general priority of the main thread in the traditional computer mode.

It sounds abstract and difficult to understand, but you can try. Use your iPad or iPhone, open Safari, and then load a complicated webpage, such as Sina's homepage. When the webpage is halfway loaded, put your finger on the screen and move around. You will find that all rendering will stop immediately, and the web page will never continue to load until you take your finger away.

Repeat this operation on Android devices, and you will find that the browser will continue to try to load pages and render HTML, trying to multitask at the same time. Therefore, an efficient dual-core processor is very important for Android, which is why Galaxy S II can be very smooth.

In iOS, the UI rendering process has absolute priority. When the user touches the touch screen of iPhone, all processes in iOS will stop, UI threads will intercept all events, and the system will use all resources to render UI processes to ensure the real-time rendering priority of the user interface. But the priority of UI rendering process in Android system is not so high. In other words, when you touch the screen of the Android phone, the programs in the background of the system are still running, such as downloading and viewing short messages, so the resources obtained by the system UI are not enough, which is the reason why the Android system is not smooth.

For this reason, the newly released Galaxy Nexus, even a tablet with a quad-core processor, cannot guarantee a smooth operating experience. These devices can only be compared with the fluency of the iPhone three years ago, so why didn't the Android team fundamentally solve this problem?

In addition to UI rendering, the lack of effective hardware acceleration in Android is also a reason. There are huge differences in hardware acceleration on different Android phones, and Apple is the only handheld device company that does both hardware and software. Only Apple can insert software optimization into the hardware, so that devices based on Apple chips can not only save power, but also be smooth.

In fact, the development of Android started before the release of the first generation iPhone. The original Android prototype was designed as a device using a keyboard phone, which is a competitor of BlackBerry. UI rendering priority is not so important on a mobile phone with a keyboard. However, after the release of the iPhone, the Android team quickly launched products that could compete with the iPhone. Quickly change Android into a touch-screen mobile phone system, but it was impossible to rewrite the UI framework at that time, because if all programs in the Android application market become unavailable, this relationship will continue in a vicious circle.