From d6a2ee318e2aafc2e94e633b021d6e6f15fe683b Mon Sep 17 00:00:00 2001 From: Travis Parks Date: Thu, 17 Sep 2020 15:08:54 -0400 Subject: [PATCH] Update CHANGELOG for 4.8.0. --- CHANGELOG.md | 5 +++++ FlatFiles/FlatFiles.csproj | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a58d70..1d41b1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 4.8.0 (2020-09-17) +**Summary** - Avoid memory leaks by creating new dynamic assemblies each time. + +I was not sure how much of a runtime impact creating a new dynamic assembly would be and so I was trying to optimize the code by storing the `AssemblyBuilder`/`ModuleBuilder` in a static variable. However, I had no mechanism in place to prevent generating duplicate types/methods each time a reader/writer was created, so over time the same emitted code was being added to the dynamic assembly over and over again; a.k.a., a memory leak. At first I tried to implement some sort of caching but then realize that it was almost impossible to uniquely identify a type/column mapping configuration without looking at every property on every mapping. I decided to try creating new assemblies each and every time and that I ran a benchmark. There was no discernable difference in performance, so I think eliminating the premature optimization is the right approach. + ## 4.7.0 (2020-02-15) **Summary** - Support capturing trailing text after last fixed-length window. diff --git a/FlatFiles/FlatFiles.csproj b/FlatFiles/FlatFiles.csproj index 0b76b45..70e7cec 100644 --- a/FlatFiles/FlatFiles.csproj +++ b/FlatFiles/FlatFiles.csproj @@ -10,17 +10,17 @@ https://github.com/jehugaleahsa/FlatFiles.git git csv;comma;tab;separated;value;delimited;flat;file;fixed;width;fixed-width;length;fixed-length;parser;parsing;parse - Support capturing trailing text after last fixed-length window. + Avoid memory leaks by creating new dynamic assemblies each time. true FlatFiles.snk - 4.7.0 + 4.8.0 8.0 https://raw.githubusercontent.com/jehugaleahsa/FlatFiles/master/icon.png - 4.7.0.0 - 4.7.0.0 + 4.8.0.0 + 4.8.0.0 UNLICENSE.txt