Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better options for serializer #180

Merged
merged 7 commits into from
Nov 29, 2024
Merged

Better options for serializer #180

merged 7 commits into from
Nov 29, 2024

Conversation

adamhathcock
Copy link
Member

@adamhathcock adamhathcock commented Nov 28, 2024

small change to use reduce a list allocation
also adds option to cache by Base. Could be unnecessary for IFCs

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 57.33333% with 32 lines in your changes missing coverage. Please review.

Project coverage is 66.42%. Comparing base (05f90ea) to head (15bab92).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...eckle.Sdk/Serialisation/V2/Send/EmptyDictionary.cs 18.75% 13 Missing ⚠️
...le.Sdk/Serialisation/V2/SerializeProcessFactory.cs 0.00% 13 Missing ⚠️
...k/Serialisation/V2/DummySendServerObjectManager.cs 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              dev     #180       +/-   ##
===========================================
+ Coverage   53.90%   66.42%   +12.51%     
===========================================
  Files         231      249       +18     
  Lines        9337    10042      +705     
  Branches     1071     1076        +5     
===========================================
+ Hits         5033     6670     +1637     
+ Misses       4049     3020     -1029     
- Partials      255      352       +97     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

JR-Morgan
JR-Morgan previously approved these changes Nov 29, 2024
Copy link
Member

@JR-Morgan JR-Morgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved but see comment

) : IDeserializeProcess
{
private DeserializeOptions _options = new(false);
private readonly DeserializeProcessOptions _options = options ?? new(false);

private readonly ConcurrentDictionary<string, (string, IReadOnlyList<string>)> _closures = new();
private readonly ConcurrentDictionary<string, Base> _baseCache = new();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not need to optimise for cases where we have a single c# instance of Base appear multiple times in the graph

@adamhathcock adamhathcock merged commit 1844386 into dev Nov 29, 2024
2 checks passed
@adamhathcock adamhathcock deleted the better-options branch November 29, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants