roboguice/roboguice — pull request #179 by stephanenicolas (2014-02-23 20:08:26+00:00)
Title: Experimental Annotation processing for RoboGuice DefaultRoboModule optimization

Hi Michael,

as we talked about previously, this annotation processor tries to optimize the RoboGuice's DefaultRoboModule.

It will create a custom DefaultRoboModule so that every feature that is not used will not be loaded by RoboGuice. It can currently discard :

* unneeded Android service if they are not injected.
* injection of extras, resources, and a few more things will only get bound if used.

It's really experimental and still the package information is hard coded to fit my example.

I would like to get an early feedback to see if you like that feature or not, and want to comment the design of my implementation.

I need to :
* add more tests
* adapt to application package name (I still don't know exactly how I will do it, maybe parsing the manifest)
* complete some features (by the way do you have an example of using @Named android_id ?

On a Nexus 4, the startup time decrease from 840 ms to 670ms (average on 30 launches) with this optimization of a program that uses a lot of views and fragments injections, and I think it's the case of most apps.