Fully revert "[DependencyInjection] backport perf optim"