Former Writer · Oct 3, 2012 at 03:00 pm

Decrease Compile Times with Fast AAPT

There are many of elements that go into compiling any source code. Not only are there various files that need to be compiled, but multiple processes are used to compile them. Sometimes, those processes aren’t always as fast or optimized as they could be. One such example is is AAPT—which stands for Android Asset Packaging Tool. It’s commonly used in compiling Android applications.

While compiling some applications like DSLR Controller, XDA Elite Recognized Developer and Senior Moderator Chainfire noticed that compile times were higher than they ought to be. This warranted an investigation. Chainfire concludes his investigation as such:

So I set out to fix this. I had done all the usual tricks, even gave Eclipse loads more memory (helped with regular performance, but not building) but nothing major seemed to change. Then I figured out most of the time building was spent in AAPT

Based on this find, Chainfire was able to develop a hack that help correct the issues behind the slow build times. Chainfire provided a first build of this hack/fix along with instructions on how to determine if you have the problem that this hack/fix rectifies:

A quick way to spot if this will have effect on your slow build is as follows:

– In Eclipse, set Build output to Verbose under Window -> Preferences -> Android -> Build.
– Clean and build your project.
– If the build pauses on lines in the “(new resource id from )” format, you have the problem FAAPT fixes

As per the norm with Chainfire applications, user response has been quite positive. Nearly everyone who has used this to fix slow build times has seen a decrease in build times to some extent. How much this helps will of course depend on what you’re building and what OS you’re using. Currently, there’s a version for Windows and a version for Linux. It is important to note that Chainfire warns that this is a first release, and to not test it on production builds.

If you’d like to learn more about the fix or take it for a spin, check out the original thread.


_________
Want something on the XDA Portal? Send us a tip!

Former Writer

Former Writer is an editor on XDA-Developers, the largest community for Android users. View Former Writer's posts and articles here.
Chris Gilliam · May 24, 2015 at 03:59 pm · 2 comments

XDA Recap: This Week In Android (May 17 – 23)

Another week, another recap. The Sunday tradition marches on this week with a fresh no-nonsense look at big-picture news. Here in the digital XDA writers’ room, we spend our days pouring over an average of 2,500 news items and forum threads every 24 hours. Only the most timely and interesting bits survive the editing process, but the portal’s front page still sees weekly counts in excess of 100 posts. This is a glut of content to absorb, especially if following...

XDA NEWS
Mario Tomás Serrafero · May 24, 2015 at 11:00 am · 1 comment

Sunday Debate: Are Smaller Bezels Better or Worth It?

Bezels have been getting smaller and smaller as the years go by, and while devices from 2011 needed to trim some fat, there is no absolute rule that says that smaller bezels, after a happy medium, are beneficial to a phone. Part of this is that, with today’s current smartphone paradigms, an absolute lack of bezels does not produce an inherently better user experience.   With each technological advancement come limitations and compromises of some sort, and bezels are not...

XDA NEWS
Jimmy McGee · May 24, 2015 at 06:00 am · 3 comments

LG G4 First Impressions and Unboxing – XDA TV

The latest in LG’s signature line of “G phones” has been released. The LG G4 is the successor to the popular LG G3. Coming with many different design styles, from two types of leather to ceramic white, the LG G4 has the looks, but does it have the power? In this episode of XDA TV, Producer TK gets hands on with a new LG G4. TK opens the box for a standard unboxing. Then, TK shows off the phone and...

XDA NEWS
Share This