9

In the last few days I have noticed some very strange behavior in my android project:

  • After every single little change of an xml-resource, the building of the android application's workspace takes a long time.
  • The changing of java source files doesn't cause the same slow building

And I have no idea what's going wrong.

I have already cleaned that project but it didn't help.

Is there any way to find out what is making the build process so slow?

P.s.

At about 89% i see the building message invoking 'Android Pre Compiler' on 'proj. name'

melodiouscode
  • 2,105
  • 1
  • 20
  • 41
Tima
  • 12,765
  • 23
  • 82
  • 125
  • how many Projects you are having in Workspace? – Venky May 23 '11 at 14:26
  • How many KByte/MBytes of resources do you have in your project? You should disabled automatic building when modifying/updating resources. – david May 23 '11 at 14:33
  • How long is "too long". Also, did you set any layout files to use the v3.0 SDK? I did this by accident and found it took much longer than it had done previously (my target for current project is v2.2). Once I changed the layouts back to v2.2 things went back to normal build speed. – Squonk May 23 '11 at 14:46
  • @all it's project for v2.2 SDK. There 10 projects in the workspace. I have problems only with one of them, this one has 2.3MB. Disabling automatic building wouldn't be a good solution, because sometimes i add new layouts and id's – Tima May 23 '11 at 15:14
  • I get this , it's when you have a large amount of xml files in your /layout/ folder or a large amount of files in /drawable/ – Blundell Jul 08 '11 at 13:00
  • I got this same problem when I upgraded Android tools and SDK a while ago. Maddening. It cannot be a problem in my projects since the previous versions built them very quickly. Google "upgraded" a tool and killed performance. – Barry Fruitman May 12 '12 at 17:39
  • Same thing is happening to me now. Google upgraded their SDKs and now Eclipse won't get past the "building workspace" phase. Turning off Build Automatically doesn't help, either. Grr. – Barry Brown May 15 '12 at 10:32

2 Answers2

2

I've dealt with various eclipse problems before that slowed it down. A couple things to recommend, enable advanced garbage collection and some of the other items recommended for a performance boost in this article How can you speed up Eclipse?.

Try enable verbose build output in your preferences for android>build to see if any of your specific resources are the bottleneck.

Although I was unable to find the article, I've read about using eclipse in debug mode and profiling the IDE as you work to see if any plugins are causing interruptions.

Last, I have used the community version of intellij idea 10 http://www.jetbrains.com/idea/ which has strong android support. It's much faster than eclipse for most tasks, but doesn't have as much embedded android support (you must use ddms as a separate tool, no UI builder, etc...)

Community
  • 1
  • 1
Ty Smith
  • 2,594
  • 2
  • 23
  • 29
0

Increase Xms and Xmx parameter in eclipse.ini file.

My default values was: -Xms40m -Xmx256m

My new values are: -Xms256m -Xmx1024m

Matjaz Kristl
  • 746
  • 1
  • 5
  • 12