From e674dc4077c7e253787d89c24db6e9bcd6c16526 Mon Sep 17 00:00:00 2001 From: Nikolay Pianikov Date: Wed, 15 May 2024 14:58:49 +0300 Subject: [PATCH] Reducing memory consumption during code generation Generates more efficient code for Singleton and PerResolve lifetimes --- .run/Generator.run.xml | 2 +- build/GeneratorTarget.cs | 4 +- readme/ArrayDetails.md | 36 +++++++-------- readme/EnumDetails.md | 38 +++++++--------- readme/FuncDetails.md | 29 ++++++------ readme/SingletonDetails.md | 35 ++++++--------- readme/TransientDetails.md | 33 ++++++-------- readme/perresolve.md | 4 -- .../Core/Code/BlockCodeBuilder.cs | 45 +++++++++---------- src/Pure.DI.Core/Core/Code/BuildTools.cs | 7 +-- .../Core/Code/StatementCodeBuilder.cs | 10 ++++- src/Pure.DI.Core/Core/Code/Variable.cs | 2 + src/Pure.DI.Core/Core/Code/VariableInfo.cs | 20 ++++++--- .../Pure.DI.IntegrationTests/FactoryTests.cs | 2 +- 14 files changed, 123 insertions(+), 144 deletions(-) diff --git a/.run/Generator.run.xml b/.run/Generator.run.xml index c8b51845d..55169d836 100644 --- a/.run/Generator.run.xml +++ b/.run/Generator.run.xml @@ -1,7 +1,7 @@