The components of Opera Mobile 11 on Android
By Dag Olav Noremdagolav. Tuesday, March 22, 2011 7:00:00 AM
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
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 Mobile 11 for Android - ARM5 version
- Will run on any device with Android 1.6 and higher, but on ARM7 it will not be quite as fast (Non-exhaustive list of ARM7 devices maintained by Adobe)
- 4.5MB smaller install size
- NB! You will not get update alerts in Android Market. You have to manually check for updates.
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 . 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.