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

Add compression option for NewtonSoftJsonSerializer #6341

Merged

Conversation

Arkatufus
Copy link
Contributor

Changes

  • Adds use-compression to NewtonSoftJsonSerializer
  • When enabled, serialized data are compressed using System.IO.Compression.GZip

@Aaronontheweb
Copy link
Member

@Arkatufus I know you shared data with me on Slack, but can you include any benchmark data for this?

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

Overall LGTM but need to include benchmark data on the PR

@@ -4789,6 +4789,7 @@ namespace Akka.Serialization
public NewtonSoftJsonSerializer(Akka.Actor.ExtendedActorSystem system) { }
public NewtonSoftJsonSerializer(Akka.Actor.ExtendedActorSystem system, Akka.Configuration.Config config) { }
public NewtonSoftJsonSerializer(Akka.Actor.ExtendedActorSystem system, Akka.Serialization.NewtonSoftJsonSerializerSettings settings) { }
public bool Compressed { get; }
Copy link
Member

Choose a reason for hiding this comment

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

API changes LGTM

# JSON string using GZip.
# Useful to avoid network congestion when your serialized
# data starts to grow to the megabyte size
use-compression = false
Copy link
Member

Choose a reason for hiding this comment

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

LGTM - fully wire compatible

@Aaronontheweb Aaronontheweb merged commit d7daf56 into akkadotnet:v1.4 Jan 11, 2023
@Aaronontheweb Aaronontheweb added this to the 1.4.49 milestone Jan 11, 2023
@Aaronontheweb Aaronontheweb added akka.net v1.4 Issues affecting Akka.NET v1.4 perf serialization labels Jan 11, 2023
@Aaronontheweb
Copy link
Member

@Arkatufus needs to be ported to v1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
akka.net v1.4 Issues affecting Akka.NET v1.4 perf serialization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants