Skip to content

Merging#1

Merged
MaximMikhisor merged 53 commits intoLineSmarts:masterfrom
MessagePack-CSharp:master
Jun 28, 2022
Merged

Merging#1
MaximMikhisor merged 53 commits intoLineSmarts:masterfrom
MessagePack-CSharp:master

Conversation

@MaximMikhisor
Copy link
Copy Markdown

No description provided.

AArnott and others added 30 commits July 12, 2021 11:04
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
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.
* 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.
AArnott and others added 23 commits May 24, 2022 10:08
`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
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
@MaximMikhisor MaximMikhisor merged commit 8ef5aec into LineSmarts:master Jun 28, 2022
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.

6 participants