How does the ART runtime affect Clojure-Android apps?

470 views
Skip to first unread message

Nicholas Kariniemi

unread,
Nov 18, 2013, 5:07:47 AM11/18/13
to clojure...@googlegroups.com
Google introduced the experimental ART runtime with KitKat. It uses AOT compilation instead of JIT (see this XDA post), compiling apps when they are installed instead of on the fly when they are run. Has anyone tested this out? I would be interested to see how it affects Clojure app performance, in particular with respect to startup times, and I can't test it myself for a little bit. You can activate it in developer options, after which the phone will reboot and generate ART versions of all of your apps.

Profpatsch

unread,
Nov 18, 2013, 8:18:17 AM11/18/13
to clojure...@googlegroups.com
On 13-11-18 02:07am, Nicholas Kariniemi wrote:
> Google introduced <http://source.android.com/devices/tech/dalvik/art.html>the experimental ART runtime with KitKat. It uses AOT compilation instead
> of JIT (see this XDA post<http://forum.xda-developers.com/showpost.php?p=47482844&postcount=64>),
> compiling apps when they are installed instead of on the fly when they are
> run. Has anyone tested this out? I would be interested to see how it
> affects Clojure app performance, in particular with respect to startup
> times, and I can't test it myself for a little bit. You can activate it in
> developer options, after which the phone will reboot and generate ART
> versions of all of your apps.

Won’t this make serious code rewrite in clojure-android necessary?

How I understand it, a big part of the core deals with the intricacies
of Dalvik as compared to the normal JVM.

--
Proudly written in Mutt with Vim on Archlinux.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es

Alexander Yakushev

unread,
Nov 18, 2013, 8:42:29 AM11/18/13
to clojure...@googlegroups.com
Hi Nicholas,

I saw this announcement, but there is nothing I can say about it before I see the official documentation. It would be nice to have a faster runtime, but much depends on whether we are able to compile Clojure code for that runtime. Even worse, if ART drops facilities to dynamically load DEX-files in runtime, it will be impossible to work in REPL with it.

I say we have to wait until this is no longer experimental and there appears official explanation how it works.

Best regards,
Alex

Zach Oakes

unread,
Nov 20, 2013, 10:12:58 AM11/20/13
to clojure...@googlegroups.com
I have also not had a chance to try ART (my Nexus 4 and 2012 Nexus 7 are still waiting...) but there is an early indication that there may be issues. I've received several crash reports from Nightweb users with the Nexus 4 and 5, presumably running 4.4 with ART enabled. Here's the error: http://pastebin.com/stJptfWB

Daniel Solano Gómez

unread,
Nov 20, 2013, 11:43:11 AM11/20/13
to clojure...@googlegroups.com
Hello,

I tried installing my Clojure REPL on a Nexus 5 with ART enabled and ran
into a similar error. I've flashed a Galaxy Nexus to CM11 build (based
on KitKat), and am planning to examine this a bit closer. I just need
time to get to it.

Sincerely,

Daniel

On Wed Nov 20 07:12 2013, Zach Oakes wrote:
> I have also not had a chance to try ART (my Nexus 4 and 2012 Nexus 7 are
> still waiting...) but there is an early indication that there may be
> issues. I've received several crash reports from Nightweb users with the
> Nexus 4 and 5, presumably running 4.4 with ART enabled. Here's the error:
> http://pastebin.com/stJptfWB
>
> On Monday, November 18, 2013 5:07:47 AM UTC-5, Nicholas Kariniemi wrote:
> >
> > Google introduced <http://source.android.com/devices/tech/dalvik/art.html>the experimental ART runtime with KitKat. It uses AOT compilation instead
> > of JIT (see this XDA post<http://forum.xda-developers.com/showpost.php?p=47482844&postcount=64>),
> > compiling apps when they are installed instead of on the fly when they are
> > run. Has anyone tested this out? I would be interested to see how it
> > affects Clojure app performance, in particular with respect to startup
> > times, and I can't test it myself for a little bit. You can activate it in
> > developer options, after which the phone will reboot and generate ART
> > versions of all of your apps.
> >
>
> --
> You received this message because you are subscribed to the Google Groups "clojure-android" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clojure-andro...@googlegroups.com.
> To post to this group, send email to clojure...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojure-android.
> For more options, visit https://groups.google.com/groups/opt_out.

Alexander Yakushev

unread,
Nov 21, 2013, 3:29:18 AM11/21/13
to clojure...@googlegroups.com

I have 2012 N7, so I'm also lacking a testground. Can be tested on the emulator though (if emulator supports ART). I hope updating dexer in our custom Clojure build should be enough to make it work again.

You received this message because you are subscribed to a topic in the Google Groups "clojure-android" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure-android/J4cxkMRW2QA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure-andro...@googlegroups.com.

Mike Qin

unread,
Dec 10, 2013, 12:35:46 AM12/10/13
to clojure...@googlegroups.com
Hi

I tried a simple sample app using neko, it report exactly the same error trace. Is this bug fixed? I was really curious to see if the start up time of clojure is acceptable using ART now.

Mike Qin

unread,
Dec 10, 2013, 12:41:24 AM12/10/13
to clojure...@googlegroups.com
Also, I think I found: https://github.com/cernekee/android_art/commit/fc2ac71d0d9e147c607bff9371fe2ef25d8470af

Which indicate this might be a ART bug.


On Wednesday, November 20, 2013 10:12:58 AM UTC-5, Zach Oakes wrote:

Alexander Yakushev

unread,
Dec 13, 2013, 10:48:51 AM12/13/13
to clojure...@googlegroups.com
Hello Mike,

I haven't yet had the guts to install 4.4 update. I hope this weekend my call of duty (and that bottle of bourbon) will make me brave enough to update and see what is going on.

Thank you for pointing at the commit. It could be related.

Best regards,
Alex

Mike Qin

unread,
Dec 15, 2013, 9:00:55 AM12/15/13
to clojure...@googlegroups.com
I think the simulator does support 4.4. It's just that it only support
the armhf image and runs extremely slow on a x86 laptop.

On Fri, Dec 13, 2013 at 10:48 AM, Alexander Yakushev <al...@bytopia.org>
wrote:

Benjamin Chi

unread,
Dec 27, 2013, 10:34:39 AM12/27/13
to clojure...@googlegroups.com
I'm running Gummy 4.4.2 on Galaxy S3 on ART runtime, it's very fast. I have similar problem with clojure apps. CatLog shows useful information about the crash.
Reply all
Reply to author
Forward
0 new messages