angular/di.dart — pull request #114 by antingshen (2014-05-29 21:49:26+00:00)
Title: perf(injector): inlined getProviderWithInjector

Removed `_getProviderWithInjectorForKey`. The code is now inlined in two places that used it. Results in ~40% speedup in dart VM with `instance_benchmark.dart` testing `getInstance` speed of deeply nested injectors.

Improvements are from:
- Function inlining
- Using iteration to walk up injector tree instead of recursion
- Removing creation of wrapper class used to return multiple values

Having redundant code was chosen over using a function that returns only an injector, since after such a function returns, the caller would need to retrieve the provider again.

The call on line 102 of `base_injector.dart` was removed as the recursive call would result in a walk up the injector tree in the next function anyway.