The problem is that even if the Injectors map contains the value, but it is null, it is not considered a hit. Then the injector is looked up again.
We have a base fragment used across our app that applies icepick to all subclasses, but not all of those subclasses have saved state. In those cases Icepick constantly searches for the injector.
A simple INJECTORS.contains check would help this case and improve performance.
Icepick.getInjector
looks for an injector cache hit withThe problem is that even if the Injectors map contains the value, but it is null, it is not considered a hit. Then the injector is looked up again.
We have a base fragment used across our app that applies icepick to all subclasses, but not all of those subclasses have saved state. In those cases Icepick constantly searches for the injector.
A simple
INJECTORS.contains
check would help this case and improve performance.