Processing annotations on Android is known to be slow.
In DroidParts each annotation has a wrapper class. The first time injection is performed on an object, annotations for it’s class are read, wrapped and cached.
I’ve ran a micro benchmark
Activity with 10
TextViews in it’s
Note that logging has to be silenced, otherwise you’ll be benchmarking LogCat.
|Benchmark, 10 000 iterations||HTC Desire 2.3.7||Galaxy Nexus 4.3|
The performance drop with annotations wrapped & cached is negligible.
Also check out this blog post.
Crash after Layout Changes¶
Sometimes Eclipse doesn’t update ids after Views get rearranged in a layout xml file. This results in a strange startup crash.
To fix it, run Project => Clean.