Up to 10 times faster building with Eclipse (/apktool/etc) !
Posted on 2012-09-26, 20 comments, 52 +1's, imported from Google+/Chainfire

NOTICE: This content was originally posted to Google+, then imported here. Some formatting may be lost, links may be dead, and images may be missing.

I have just released the first test binaries of FAAPT (Fast AAPT). AAPT is a tool used in the Android app build process - it really slows down your development if it's not performing. So much so it drove me to muck with the source to find the bottleneck - and I found what was the bottleneck (for me).

For example, DSLR Controller build times dropped from 35 seconds minimum to 2-3 seconds on my PC. Finally I can develop without getting frustrated about the constant waiting. Hell, I even turned "Build Automatically" back on in Eclipse, and it hasn't been bothering me at all !

See XDA for further details !


[DevTOOL][2012-09-26] Fast AAPT (test#1) - xda-developers

+152
Andrew Dodd commented on 2012-09-27 at 01:55:

Hmm, maybe submit it to CM gerrit first?  People are a bit more willing to live on the bleeding edge.

Giuliano Peretti commented on 2012-09-27 at 05:48:

Tried yesterday but for me there is no difference, could I help in someway? With info of course...

Chainfire commented on 2012-09-27 at 07:14:

+Andrew Dodd AFAIK, CM doesn't do SDK builds, so that wouldn't be any use. Anyways, the patch is pretty straightforward (once you've found the bottleneck), I don't think there should be any problems with acceptance once it has been cleaned up.

+Giuliano Peretti This specific patch has to do with XML files, so if XML file parsing isn't the bottleneck with your builds, you're not going to see any difference. If you're still having slow builds (on a fast PC) give Eclipse more memory, or try renaming all your .png's to .PNG, if that helps, preoptimize your images.

Giuliano Peretti commented on 2012-09-27 at 08:48:

+Chainfire

Thanks a lot. You are a genius!

Zoltan Fekete commented on 2012-09-27 at 12:07:

You! Yes you! You are my hero!!! 

Thanks for this.

Andrew Dodd commented on 2012-09-27 at 12:15:

+Chainfire I'd need to double-check, but I'm pretty sure the build process uses aapt when assembling all of the system apps.  I'll do some digging tonight or tomorrow.

+Chirayu Desai is running some tests to check whether it would be beneficial.

Chainfire commented on 2012-09-27 at 13:55:

+Andrew Dodd The question is if it uses the aapt built by the build process to build those apps. Let me know. Either way, I hope to submit to AOSP later today. If I don't make that, it's probably going to be caried over the weekend (weekend away with gf).

Pär Dahlberg commented on 2012-09-28 at 09:17:

Great work!

Chainfire commented on 2012-09-28 at 11:07:

+Andrew Dodd +Chirayu Desai Submitted to AOSP ( https://android-review.googlesource.com/43680 ) and somebody else submitted it to AOKP as well ( http://gerrit.sudoservers.com/3722 ) ... if you guys submit it to CM, please let me know the link :)

Chirayu Desai commented on 2012-09-28 at 12:11:

+Chainfire i saw that a few hours back, held off uploading so i could test.

Will let you know the link when i upload :)

Chainfire commented on 2012-09-28 at 12:15:

+Chirayu Desai Due to the nature of the improvements, I doubt it does anything significant for framework builds though... only for normal app development.

Chirayu Desai commented on 2012-09-28 at 12:17:

+Chainfire it might help with installclean builds, and many apps are built in a standard Android build, a quick wc shows 62 on CM10.

EDIT: It's up: http://review.cyanogenmod.com/24040

Andrew Dodd commented on 2012-09-28 at 12:27:

+Chainfire +Chirayu Desai Yeah, a decent number of apps are built in addition to the framework stuff.  That said, it's only part of the build process - this might only gain 1-2% off of build times, but 1-2% times 40-50+ builds/night every night adds up.  Needs some investigation and evaluation - but even if the benefit is small in a typical CM build use case, it doesn't hurt to have this there.  (Unless, of course, you've introduced a regression.  :) )

Chainfire commented on 2012-10-01 at 20:29:

+Andrew Dodd +Chirayu Desai Please note https://android-review.googlesource.com/#/c/43680/ has been updated to fix a compatibility problem with Mac OS X.

Chainfire commented on 2012-10-01 at 20:30:

@all There's now also a Mac OS X version attached to the XDA post for those who want the binaries!

Chirayu Desai commented on 2012-10-03 at 15:45:

+Chainfire pushed patchset 2 to CyanogenMod Gerrit, didn't get the time to test it though.

Chainfire commented on 2012-10-04 at 17:22:

Cyanogen putting a brake on it, though :/

Chirayu Desai commented on 2012-10-10 at 13:30:

Aaand it's merged into CM. :)

Still no traction on AOSP though

Chainfire commented on 2012-10-10 at 14:29:

Sooner or later I'm sure they'll look at it ...

Chainfire commented on 2012-11-28 at 12:53:

The patch has been partially rewritten and is now merged in AOSP. Next ADT update everybody will see these speed improvements :)

This post is over a month old, commenting has been disabled.