Merged
Conversation
This isn't on by default, and while this first trivial implementation allocates every string and passes it through `string.Intern(string)`, many optimizations could be made to it either in this library directly or by apps through overridding the virtual method. Closes #634
This gets us a few things: 1. Intern strings without wastefully allocating them first in the common fast paths. 1. Switch to a string collection that retains only weak references.
Also revert the Options changes. If the app needs to customize string interning, they can do so by changing the resolver to their own formatter.
This caused a test failure on `net472`.
It is still available via the `StringInterningFormatter`, which can be turned on by default by aggregating a custom resolver, or by specifying this on a `[Key]` or `[DataMember]` member: ```cs [MessagePackFormatter(typeof(StringInterningFormatter))] ```
In AOT-only environments it seems it was impossible to avoid loading `StandardResolver` because the `MessagePackSerializer` had a static property with an initializer that loaded the `StandardResolver`. After this change, if the `DefaultOptions` getter is never called, or its setter is called first, then the `StandardResolver` can be avoided. Fixes #832
Fixed typo in README.MD
Allows client code to avoid tripping over StandardResolver
Add string interning option
Merge master into develop
Add CompressionMinLength field to unpublished api spec
Before, it only applied to the `Lz4Block` scheme, but I don't see why we would want to apply `Lz4BlockArray` without regard to minimum length, so I've changed the library to always honor the new setting.
Merge master to develop
* Update versions of MPC dependencies * Add net6.0 target Co-authored-by: Andrew Arnott <andrewarnott@live.com>
Promote Unshipped APIs to Shipped
Global Using and File Scoped Namespace Test
* Fix nullable member file name handling Generating multiple files including the letter '?'. Invalid file name char should be avoided.
update package.json to 2.3.85
Update SDK to 6.0.300
`DateOnly` requires 5 bytes (typically). `TimeOnly` requires 6 bytes for second resolution or 8 bytes for ticks resolution. This is automatically selected based on the original value. Closes #1240 # Conflicts: # src/MessagePack/net6.0/PublicAPI.Unshipped.txt
Add built-in support for .NET 6 `DateOnly` and `TimeOnly` types
Suppress CS1591 warnings in generated code
Merge master to develop
Where we already had a .NET 6 target, we just drop net5.0. Where .NET 5 was the latest target, we change it to target .NET 6. This is because .NET 5 is no longer supported by Microsoft, so no one is expected to be using that runtime at this point.
MessagePack.Generator RollForward to Major
Drop net5.0 runtime targets
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 10.0.3 to 13.0.1. - [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases) - [Commits](JamesNK/Newtonsoft.Json@10.0.3...13.0.1) --- updated-dependencies: - dependency-name: Newtonsoft.Json dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 12.0.3 to 13.0.1. - [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases) - [Commits](JamesNK/Newtonsoft.Json@12.0.3...13.0.1) --- updated-dependencies: - dependency-name: Newtonsoft.Json dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
…lizerBenchmark/Newtonsoft.Json-13.0.1 Bump Newtonsoft.Json from 12.0.3 to 13.0.1 in /benchmark/SerializerBenchmark
…/Newtonsoft.Json-13.0.1 Bump Newtonsoft.Json from 10.0.3 to 13.0.1 in /sandbox/Sandbox
Allocating 1MB buffers contribute to the large object heap and should be avoidable for applications that it is a problem for.
Add StringInterningFormatter.cs.meta for Unity
Add option to avoid large buffer allocations
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.
No description provided.