Implemented a formatter for MessagePack for performance reasons#10
Merged
Conversation
Owner
|
I'll explain a little - now that you use MessagePackAnalyzer, this library and its dependencies will be delivered along with your other libraries. Therefore, you need to use PrivateAssets="all" so that the library is available only at compile time |
Owner
|
I have corrected the location of the projects and the .csproj themselves a bit. Note that although not explicitly supported by the .Net Framework, .Net Standard 2.0 is available from .Net Framework 4.6.1/4.7.2. |
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.
I needed a binary formatted message for performance reasons. So, I used MessagePack to achieve this goal. Also, it is possible with MessagePack to convert to JSON for debugging purposes. In my project, I used a couple of
#IF DEBUGs but it would be unnecessary for this context. The performance gain is not huge but it helps when the traffic load gets higher.Currently, it only supports .NET Standard 2.0 and above. .NET Framework support does not exist.
P.S: Initially I was planning to use ZeroFormatter, but since the benchmarks show no significant gain and MessagePack has the ability to convert to JSON quickly, I took that path.
P.S 2: You created such a nicely crafted library that implementing such a thing was trivial. I appreciate your craftsmanship! Since I used this in my personal project, I believe it would be better to contribute to the project itself.