From 7cc2c4a379eb37c5d4408ece2a11ad3213f7d5b7 Mon Sep 17 00:00:00 2001 From: Milad Rahimi Date: Mon, 7 Oct 2019 19:23:41 +0330 Subject: [PATCH] update readme --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index b5f89ac..43efeab 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,15 @@ container.Singleton(func(c Config) Database { Notice: You can only resolve the dependencies in a binding resolver function that has already bound. +### Usage Tips + +#### Performance +The package Container inevitably uses reflection in binding and resolving processes. +If performance is a concern, you should use this package more carefully. +Try to bind and resolve the dependencies out of the processes that are going to run many times +(for example, on each request), put it where that run only once when you run your applications +like main and init functions. + ## Contributors * [@miladrahimi](https://github.com/miladrahimi)