[DO NOT MERGE] FastCloner as DeepCloner replacement#469
Draft
lofcz wants to merge 1 commit intoFoundatioFx:mainfrom
Draft
[DO NOT MERGE] FastCloner as DeepCloner replacement#469lofcz wants to merge 1 commit intoFoundatioFx:mainfrom
lofcz wants to merge 1 commit intoFoundatioFx:mainfrom
Conversation
8309c06 to
bc1af18
Compare
Member
|
Thank you so much for taking the time to create this pr, will definitely look into this very very soon. |
Author
|
Btw, your test |
- Replace Force.DeepCloner with FastCloner v3.4.4 (source imported) - Add Update-FastCloner.ps1 script for source import automation - Update ObjectExtensions.DeepClone to use FastClonerGenerator - Add nullable annotations to DeepClone extension method - Replace #if MODERN with #if true // MODERN for .NET 8+ targets - Add benchmark comparison results Benchmark results show FastCloner is 7-149% slower than DeepCloner for our test cases, contrary to published benchmarks. reduce to fastcloner vs deepcloner internals rebase use generated fastcloner code group benchmarks, simplify position tracking work on perf remove experiment return original DeepCloner into source code until we sort this out for reproducible benchmarks remove behaviors, add licenses sync fastcloner
Author
|
Benchmark results updated, FastCloner is now consistently faster in every measured category. |
Author
|
FastCloner now runs reproducible benchmarks on each change: lofcz/FastCloner#31 (comment) |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This supersedes #444, I recommend checking that PR first for context and discussion.
FastCloner is a modern cloning library. I was approached by @niemyjski to see if we could get this in Foundatio in lieu of DeepCloner, which at this point is fairly antique.
What's in it for Foundatio?
internal->publicawayWhat's in it for FastCloner?
Proposed path to adoption
Benchmarks
Updating
One liner, replace
USERNAME, run from/srcin local FastCloner clone: