This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Kawa payload size in trivial android apps


Since I've now managed to integrate kawa with java builds using the
android gradle plugin, I just wanted to share some brief, but very
encouraging numbers. I pretty much created a minimal sample app using
Android Studio with the recognizable taskbar and related libraries.

The two libraries that get included by "standard" are the support-v4
and appcompat-v7 (the build tools version 19.0.1 versions). Their file
sizes (.jar/.aar) are 628kb and 595kb respectively. For comparison,
the kawa.jar file I built is 2.67mb.

But most apps released gets run through proguard before relases, which
typically tries to make things smaller and remove unused code.

Without the kawa stuff, but after running through proguard, the hello
world skeleton app apk created by Android Studio (showing a taskbar,
menu and a default view with a text line) is around 450kb.

With a kawa version in addition to the java version, the apk size only
grows with some 115kb. Based on my experience the kawa stuff will grow
a bit larger initially as more of the kawa standard library gets
pulled in, but eventually growth will slow down again (as only "new
code" written by yourself gets added).

For comparison my plain java Android app on the play store
("Killermatch" - a racket sport match diary) is 1.2mb, of which half
are support libraries (play store and related services). My other app
is a cross platform java game using libgdx ("Math Pyramids") is 3.9mb,
mostly libgdx libraries (it has native opengl, audio, physics
libraries in it).

The good news is that the extra payload size that kawa seems to add is
neglible for anything but the smallest of utilities on the Play Store.

Per, where do I sign up for petitioning for a "join-source" version of
the kawa compiler (one that would recognize and reconcile cross
language dependencies, similar to the groovy and scala compilers...)?
Yeah, patches, I know.. ;-)

Anyway, I'm running out of excuses for keep building apps using just
plain java, which is a good thing I believe. ;-)

Thanks,

Marius K.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]