perf(Injector): Make types getter faster

@pavelgj your last changes are great !

I have re-applied my perf modif on the factorized code