Do Dependency Injection Frameworks like ButterKnife and Dagger Make apps slower?
Asked Answered
E

1

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.

Elbaelbart answered 24/1, 2015 at 8:24 Comment(1)
does this help? #21522591Mobley
L
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.

Lacagnia answered 13/10, 2015 at 2:48 Comment(3)
Have you tried in Android KitKat devices? Dagger 2 injection takes too much time on Android Kit Kat.Promethium
Please show me stats confirming what you say. What is too much time? How does that time compare to doing Dependency Injection by hand?Lacagnia
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.Promethium

© 2022 - 2024 — McMap. All rights reserved.