Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

'Fast' dependency injection? #123

Closed
qbproger opened this issue Dec 7, 2012 · 4 comments
Closed

'Fast' dependency injection? #123

qbproger opened this issue Dec 7, 2012 · 4 comments

Comments

@qbproger
Copy link

qbproger commented Dec 7, 2012

Are there any plans to benchmark or put numbers behind the 'fast' claim? I'm curious how it compares to Guice specifically.

@patrickbaumann
Copy link
Contributor

It's nothing official or scientific, but I threw together a couple of demo Android apps that are identical in function but built with RoboGuice in one implementation and Dagger in the other. Source and results are at http://github.com/patrickbaumann/daggervsroboguice

It's a simple example but in the worst case, Dagger sliced off about 350ms of start up time compared to Guice on a Galaxy Nexus.

@scompt
Copy link

scompt commented Dec 16, 2012

Here's a tweet from @swankjesse where he mentions a couple numbers between Guice and Dagger.

@swankjesse
Copy link
Member

On Fri, Dec 7, 2012 at 1:14 AM, Joe notifications@github.com wrote:

Are there any plans to benchmark or put numbers behind the 'fast' claim?
I'm curious how it compares to Guice specifically.

Yeah, the speed difference will depend on the size of your app. Suppose you
have a small app that spends 100ms in Guice each time it starts up. The
maximum improvement you could see in such an app is 100ms. Some of the apps
I've worked on spent a long time in Guice at startup: 3000ms or more (on
some older devices, anyway). This is where Dagger's avoidance of reflection
and runtime annotations pays off.

@JakeWharton
Copy link
Collaborator

Closing. For further discussions please see the Google+ community or the mailing list.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants