Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why developing for android with multiple projects is slow on my setup?

When we first started developing for android, we had 2 projects: One for the 'core' functionality, other for the 'business' functionality. So far so good, we went through bad times waiting so much time for compilation of XML changes, but life was still quite bearable. After some time, we evolved (or not) to come with 9 projects. For some projects, we have a 'test' project. We also have some library projects, for instance, we have two different projects for different versions of android, and we have a 'shared' project for shared configs or controllers. The reason for that is because our application is quite big. When we make some changes on the core project, we usually have to recompile, and 'clean' the workspace with eclipse. Also, we usually have to use the 'Build Project' option a few times for the projects to update their references, the first build hardly compiles everything, we call this in our team 'COMBO', which is the combination of 'F5' and 'CTRL+B' to compile the projects. All this setup is killing a lot of time and making developers sad, like, a team of 6 developers :(

I know that by this time we should pretty much know all the issues and the best options, but I can't believe the way it is. And after so many time searching and trying to improve, we can't seem to find other solutions to improve development time with android.

Our set of tools is:

  • Eclipse 4.2.1
  • ADT 21.1.0
  • Eclipse Colour Themes (for a cute code)
  • SDK always updated

Hardware:

  • Windows 7 Professional 64 bits
  • 8 GB RAM
  • Intel Core i5-3470 3.20GHz

I would love answers about:

  • Compilation time improvement: Did you found any IDE that for YOU it was faster than eclipse? Why? How was the setup? What are the drawbacks of using ADT and how can I improve performance with it, while using multiple projects?
  • Project references management, is there any suggestion on how to speed up build? Should I put the whole source code in a single project?
  • Any way to speed up development when you have the device and need to deploy it while testing the application?
like image 788
mrcaramori Avatar asked Mar 25 '23 06:03

mrcaramori


1 Answers

Try Intellij.

In the latest version, 12, they made project build improvements that make it much faster than 11 and Eclipse.

Parallelization

Note also the third column, called Parallelized. This is a new compiler option which allows you to use more than one core for building a project. In this case the compiler runs for multiple independent project modules in parallel. Since each compiler thread uses file system, the benefit of parallelizing highly depends on how fast you hard drive is. Still the average gain in performance is spread between 10 and 20 percent for large projects.

Automatic Make

One more exciting compiler option added in IntelliJ IDEA 12 is automatic make. This is another time-saver, which triggers project make automatically on every change. Since the compiler runs in a separate process, it is able to compile modified files in the background, while you are doing something else. This means your project is in compiled state all the time, so you don’t need to wait any time you want to run it.

http://blogs.jetbrains.com/idea/tag/brand-new-compiler/

Also if you are using git for version control I have noticed Intellij is much better at updating after I switch branches. It integrates well with git and notices that you switched branches and refreshes and cleans out the project in the background automatically, while on Eclipse you might have to refresh and clean manually.

like image 197
Emil Davtyan Avatar answered Apr 06 '23 04:04

Emil Davtyan