[DependencyInjection] made some perf improvements