Speeding up build by moving buildDir to RAM Disk

627 views
Skip to first unread message

Martin Rajniak

unread,
Jun 9, 2014, 5:43:03 AM6/9/14
to adt...@googlegroups.com
Hey,
I am trying to find something to speed up my incremental builds with gradle. Current is 40s - 60s.

What I was thinking was to target buildDir to RAM Disk folder. 

My multiproject setup includes one Android project and a Java library. When I change buildDir property in the specific project build files it works, but Android Studio project layout doesn't like it very much. 

  buildDir = 'G:/root/android_project/build'

  buildDir = 'G:/root/library/build'

I would think that I need to change the property in root build file, but when I do that I get an error that Android Studio cannot find build folder and thus some of the IDE features might not work.

  buildDir = 'G:/root/build'

What should be the correct setup for this?

Xavier Ducrohet

unread,
Jun 10, 2014, 8:47:31 PM6/10/14
to adt...@googlegroups.com
IntelliJ has some restrictions on having content root somewhere else than under the project root. Because we create source code during the build we have source folders under the build so it may not be happy with that.

I'm not 100% sure though.


--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

Martin Rajniak

unread,
Jun 11, 2014, 7:49:07 AM6/11/14
to adt...@googlegroups.com
Thanks.

This setup gives me speed bonus when building from 
48s sometimes down to 40s without SSD. With SSD the difference is less significant - something around 4s.

But you are right that IntelliJ doesn't like it, although it is build-able, the project layout is messed up.

Dňa streda, 11. júna 2014 2:47:31 UTC+2 Xavier Ducrohet napísal(-a):
Reply all
Reply to author
Forward
0 new messages