From bea8affcaba9619a77387a5b51c26f6820c532d4 Mon Sep 17 00:00:00 2001 From: Sergey Penkovsky Date: Mon, 11 Aug 2025 22:06:38 +0300 Subject: [PATCH] doc(readme): performance information moved to top of document --- cherrypick/README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/cherrypick/README.md b/cherrypick/README.md index 8f5f3c3..d1498ef 100644 --- a/cherrypick/README.md +++ b/cherrypick/README.md @@ -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()` 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(); ``` -### 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()` 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