You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have a configurable option to enable system traces for Dagger Android module which will have traces for instance creation to debug performance with DI.
Advantages can be:
Can debug the need of making instance @Singleton or not if we see lot of allocations of it (this is anyway possible with memory profiler as well but systrace can give better picture here)
Based on these insights, one can decide to use Lazy<> or Provider<> better as per use case needs.
Easy performance debugging w.r.t DI
Example:
In this case, LightDependency is a class which is very lightweight to create whereas HeavyDependency might be doing heavy operations while instance creation (it may be 3rd party library instance as well to which we can't add traces as of now)
It would be nice to have a configurable option to enable system traces for Dagger Android module which will have traces for instance creation to debug performance with DI.
Advantages can be:
@Singleton
or not if we see lot of allocations of it (this is anyway possible with memory profiler as well but systrace can give better picture here)Lazy<>
orProvider<>
better as per use case needs.Example:
In this case,
LightDependency
is a class which is very lightweight to create whereasHeavyDependency
might be doing heavy operations while instance creation (it may be 3rd party library instance as well to which we can't add traces as of now)Then systrace can give picture like this:
The text was updated successfully, but these errors were encountered: