futurice / freesound-android

Unofficial Android client for the Freesound Project
Apache License 2.0
85 stars 16 forks source link

[CHORE] Make module provides methods static #41

Closed peter-tackage closed 8 years ago

peter-tackage commented 8 years ago

According to the Dagger 2 docs, there is a performance benefit when a module can be made entirely static:

Any module with an accessible default constructor can be elided as the builder will construct an instance automatically if none is set. And for any module whose @Provides methods are all static, the implementation doesn’t need an instance at all. If all dependencies can be constructed without the user creating a dependency instance, then the generated implementation will also have a create() method that can be used to get a new instance without having to deal with the builder.