The components of Opera Mobile 11 on Android

Those of you who have followed Opera Software for a while know that we pride ourselves on making the browser run with as little system resources as possible. Opera Mini runs on over 3000 phones. And Opera Mobile, with its responsiveness and smooth operation, really shines when running on the most basic Android handsets.

But one of the requests we got for the 10.1 beta was to make it smaller. Opera Mobile for Android currently takes 20.7MB + cache. That's only the equivalent of 5-6 MP3 songs. But for some of you with older devices and Android 2.1 or earlier (where apps can not be moved to memory card), space is a limited resource.

The actual size of Opera Mobile[/U]
The size varies from operating system to operating system (mainly due to different compilers). On Symbian, Opera Mobile is a lightweight 7MB. On Android, the total size of the components Opera needs to run are approx 10.5MB.

10.5MB you say? How did that turn into 20.7MB?


Duplication of binaries
On Android OS, applications are delivered in a compressed, .apk installer file. When the application is installed the native libraries (C++ code) are unpacked from the APK and copied to the application data directory. Java code is kept in the APK and run from there.

But the native libraries are not deleted from the APK, meaning there are now duplicate sets of libraries on the device. One compressed, one uncompressed.

CPU optimization and Android Market limitations
The development tools for Android OS enable developers to optimize for different chipsets. In our case, that means we compile for both ARM5 and ARM7 CPU's. A build with libraries compiled for ARM5 will run on an ARM7 device, but performance will not be as good. The difference is 20-30% on browser tests such as Sunspider and Peacekeeper. However, libraries compiled for ARM7 will not run on an ARM5 device.

The best way to address this is to have different builds for different devices. Which we could easily do. The problem, is distributing them.

Android Market does not give publishers the option to deliver different builds to different devices. Which means we have had to include both ARM5 and ARM7 libraries in the file, even though one of them will never be used.

So, let's add this up
Example with ARM7 device:
  • ARM7 libraries uncompressed in data directory - 8.3 MB
  • Compressed native libraries for ARM7 in the APK - 5 MB
  • Compressed native libraries for ARM5 in the APK - 5 MB
  • Other Opera components in the APK - 2.4MB
Total size 20.7MB. Of which ~10MB are never actually used. On Android 2.2 and higher it is possible to move the APK to memory card, reducing the space needed on internal memory to 8.3MB.

Opera Software is not the only developer with this challenge, and some deal with many more variables than we do. I know of one company which does not distribute in Android Market at all. Their apps are only downloadable from their own web site, where device targeting is then possible. Google is aware of these issues and we can only hope that over time they will resolve them.

But even 10MB is much bigger than some other browsers?
The bulk of Opera Mobile is the core rendering engine, Presto. There are essentially four browser rendering engines in the world today: Presto (Opera), Trident (Microsoft), Webkit (Apple/Google) and Gecko (Mozilla) (Webkit and Gecko are open source, so the companies mentioned are the main backers, not owners).

Webkit is the engine used in the pre-installed Android browser. It is part of the operating system. Many "browsers" are not actually browsers, but applications that wrap a new User Interface around that same OS component. And the size of that OS component is not reported as part of the application.

At Opera, we feel that Presto lies at the heart of our ability to differentiate the product. It is Presto that makes panning and zooming so fast in Opera Mobile. It is Presto that enables useful features like auto text-wrap and smart-tap on links.

We also think it is incredibly important that there is more than one browser engine in the market. Competition is the mother of innovation.

What about cache? That takes space too?
Unlike other apps, browsers download content. A lot of content. To improve performance, some of that content is cached on the device. One possible size optimization would be to move the cache to memory card. There are both performance and privacy challenges with that, but we are investigating and if we find a good solution, we will include it in a future update.

I love Opera Mobile, but I'll do anything to save some space!
Among some of you with older devices and Android 2.1 or earlier, every megabyte matters. So we have made available an ARM5 specific build for download here:
Opera Mini!
Another great option is Opera Mini. In Opera Mini, the Presto rendering engine is running on a server. Web pages are compressed up to 90% before being transferred to the device, making Opera Mini lightning fast and also much cheaper if you are paying per megabyte. Opera Mini is a featherweight 1MB.

If space is not a concern for you and you read this whole article just out of curiosity, go download Opera Mini anwyay smile. Personally, I use Opera Mobile when on WiFi and Opera Mini when on the move. And Opera Link to synchronize my Speed Dials between them.

Opera Mini 4.3 is here!Opera Mini 6 is here!

Comments

NicoHellbillyDeluxe Tuesday, March 22, 2011 9:03:29 AM

Very informative article, thank you!

I own a Motorola Milestone and think that Opera Mobile is worth every Megabyte it needs. It already replaced Android's internal browser as my default browser. I also use Opera Mini while I'm on the move and it loads sites blazing fast smile

linkpeter Wednesday, March 23, 2011 9:11:05 PM

I luv opera, I was keen to get this as soon as it became available, and was impressed that the size of the program has been reduced considerably, just as I get a phone with much more internal memory...anyhow, its so smooth, pinch to zoom rendering, really impressive BUT unfortunately html flash video well it starts, it freezes and sometimes it crashes...anyhow watching embedded videos is not the most important part of my browsing experience...thanks for all the work. Huawei X5 2.2.1

Originally posted by HellbillyDeluxe:

It already replaced Android's internal browser as my default browser.


Me to and as you say blazing fast

Re: Blog "Android Market does not give publishers the option to deliver different builds to different devices. Which means we have had to include both ARM5 and ARM7 libraries in the file, even though one of them will never be used."

mine shows up as
Storage Total 10.06MB
Application 8.13MB
Data 1.93MB
My phone is a ARM7 device, and I got the app from android market...that seems to indicate that it was sorted in market for ARM7 as it shows as 8MB and I was sure as hell shocked after downloading it and installing it to see my available ROM memory had increased significantly this was b4 using the app2sd function

Anyway whatever thanks again

Charles SchlossChas4 Wednesday, March 23, 2011 10:46:07 PM

up Great article

Макаров Андрейwinand Thursday, March 24, 2011 10:14:38 PM

oh, now i understand why some large apps couldn't be installed on my android 2.1 Milestone, in spite of "enough" space. That's not a problem anymore with froyomod.
I like opera mobile 11, cause it works on my device:) Version 10 didn't start at all. Now i can connect to wi-fi with proxy in my university without any headache

linkpeter Saturday, March 26, 2011 7:05:18 PM

the new update Ver.11.00.1103... now allows me to play flash without problems...best mobile browser in the universe

jmk3287 Saturday, May 14, 2011 3:58:55 PM

I'm at 20MB size on my droid incredible and it's causing a low on memory warning. I like this browser over the stock one, but its taking too much memory. please fix!

Bobohbobva Saturday, June 18, 2011 3:05:27 PM

Is there an ARM6 version available for my LG Optimus V?

Matheusnom4d3br Thursday, July 21, 2011 10:26:10 PM

sabio Monday, July 25, 2011 8:36:36 AM

Originally posted by nom4d3br:

Maybe now this problem is solved:
http://android-developers.blogspot.com/2011/07/multiple-apk-support-in-android-market.html


I came here to post the very same link. smile
Eagerly waiting for the next Opera Mobile update with optimized libraries in .apk

Write a comment

New comments have been disabled for this post.