Hacker News new | ask | show | jobs
by ge0rg 4733 days ago
Very impressive work, especially with the mobile integration! I hope this will become the next generation of multi-platform development tools, combining performance and flexibility.

However, the Android demo apps are 16MB and 23MB in size, respectively. For the larger one (Introduction to Qt5) the uncompressed sizes are: 9MB of data, 26MB native code, 134KB of dalvik code.

This looks like a major burden for low-end devices, even though I must admit the demo is looking great (and performs rather fluently on my HTC Vision, running Android 4.2.2).

4 comments

When silly puzzle games have hundreds of MB of assets it is okay, but this is a lot? Users don't seem to care or all of the "lets recompile our flash junk" that eats 500MB+ wouldn't do as well as they are doing. If app size matters it is usually the assets that need to be trimmed first.

What would be nice if in the app stores they showed how much space your app would you and let you sort on that, give some sort of incentive to reduce your size.

No need to get upset at GP. A lot of low-end Android phones have little internal storage and installing to SD is not a default thing. I'd be that most Android apps are under 15MB and a lot of apps that I use are under 3.
This is what puts me away from using Qt for Android development.

One of the advices of Google IO this year was to try to keep applications small.

According to Google bigger applications are the ones that get deleted first when space gets short. Most of the time are never reinstalled.

I consider the memory footprint even more important, though it is hard to find strong relations between APK size and memory use -- except for the "looks like the dev did not care at all" rule.

Regarding APK size, you can do miracles by using ProGuard (even with obfuscation disabled), though it will obviously fail for native code, like in the Qt case.

I just do hobby development on Android.

Day job is actually JVM/.NET/C++ enterprise applications.

Nonetheless, even my device is not swimming on free space, so I do have some care with it. And given my age, I am used to the time when every byte counted.

On my hobby development I tend to do a mix of Java/C++, depending how portable I want to do it.

That's the first official Android release! Too early to complain, but Qt is opensource, you can improve it, even if you don't know programming. Just file a bug or drop a note in the forums and help developers debug.
the QT team in the past constantly improves their codebase, so i believe the numbers will be better. i use qt since 3.1 and see the improvements in general.
Something makes me think that the native code is dynamically loading in the entire QtCore, QtGui, and QtDeclarative libraries to make the native side run.

When you build a Qt app statically you can strip all the unused functions out. But doing it for loading by the Android NDK? That seems a little trickier. You'd need to rebuild the libs specifically for that application.

Maybe there will be a better solution in the future to handle this, but it also seems likely that the native side wouldn't grow much past this size (i.e. 1 line of "hello world" is 26MB but 100,000 lines of real application code would only grow to 28MB.)

This is actually solved with the Android app Ministro. It downloads and installs qt libraries in shared locations on demand for whatever apps need them, letting you distribute just the app binary, and it will invoke Ministro to get its necessary libraries.