7

I'm about to start a relatively big project and was wondering

What are the real benefits of using these dependency injection frameworks?

Does DI increase app load times? Or offer any performance value?

Googles documentation goes against using Robojuice because of its RAM usage, is this something common across all DI's?

Interested to hear everybody's opinion.

Shifty
  • 303
  • 2
  • 16
  • 2
    does this help? http://stackoverflow.com/questions/21522091/what-are-the-specific-benefits-of-using-di-on-android – Phil H Feb 12 '15 at 09:51

1 Answers1

3

I work for NYTimes and it takes less than 100ms to instantiate hundreds of managed objects across 2 scopes using Dagger 2. Dagger helps us organize objects and remove a lot of boilerplate from activities or business objects. I would recommend it for any size app.

FriendlyMikhail
  • 2,857
  • 23
  • 39
  • Have you tried in Android KitKat devices? Dagger 2 injection takes too much time on Android Kit Kat. – Murat Feb 01 '17 at 14:55
  • Please show me stats confirming what you say. What is too much time? How does that time compare to doing Dependency Injection by hand? – FriendlyMikhail Feb 01 '17 at 16:47
  • After some profiling i noticed that problem is not about dagger. We are using NsdManager API of Android and initialize and provide it with dagger. In Android 4.4, this API is buggy and it took too much time to get iniatialized. Also you need to restart the android device if you encounter this problem. Because of that, dagger injection take too much time. – Murat Feb 03 '17 at 11:07