Repository navigation
Immutable
release. Only release title and notes can be modified.
Faster resolution of classes without dependencies
Classes with no dependencies are now constructed directly, skipping the resolution pipeline. Benchmarks show container.make running about 3x faster on them. resolver.call gets the same shortcut for methods without dependencies.
A class takes the shortcut only when nothing could change the result:
- it has no
containerProviderand no@injectmetadata, - enough runtime values were passed for every constructor or method parameter,
- it has no binding, swap or hook registered in the container.
Otherwise it goes through the regular pipeline as before. Observable behavior is unchanged: errors still reject the returned promise, resolved events are still emitted, and diagnostics_channel subscribers receive the same tracing events. Also, make is now traced only when the channel has subscribers, and isClass results are cached per constructor.
Bug fixes
- Classes that define a static
toStringmethod are now correctly detected as classes by the container (#75)