doc(readme): performance information moved to top of document

This commit is contained in:
Sergey Penkovsky
2025-08-11 22:06:38 +03:00
parent 1d7b9a9166
commit bea8affcab

View File

@@ -5,6 +5,15 @@ It provides an easy-to-use system for registering, scoping, and resolving depend
---
### Fast Dependency Lookup (Performance Improvement)
> **Performance Note:**
> **Starting from version 3.0.0**, CherryPick uses a Map-based resolver index for dependency lookup. This means calls to `resolve<T>()` and related methods are now O(1) operations, regardless of the number of modules or bindings in your scope. Previously, the library had to iterate over all modules and bindings to locate the requested dependency, which could impact performance as your project grew.
>
> This optimization is internal and does not change any library APIs or usage patterns, but it significantly improves resolution speed in larger applications.
---
## Table of Contents
- [Key Features](#key-features)
- [Installation](#installation)
@@ -234,13 +243,6 @@ final subScope = rootScope.openSubScope('featureScope')
final dataBloc = await subScope.resolveAsync<DataBloc>();
```
### Fast Dependency Lookup (Performance Improvement)
> **Performance Note:**
> **Starting from version 3.0.0**, CherryPick uses a Map-based resolver index for dependency lookup. This means calls to `resolve<T>()` and related methods are now O(1) operations, regardless of the number of modules or bindings in your scope. Previously, the library had to iterate over all modules and bindings to locate the requested dependency, which could impact performance as your project grew.
>
> This optimization is internal and does not change any library APIs or usage patterns, but it significantly improves resolution speed in larger applications.
---
## Using Annotations & Code Generation