{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/performance/issues/525","repository_url":"https://api.github.com/repos/dotnet/performance","labels_url":"https://api.github.com/repos/dotnet/performance/issues/525/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/performance/issues/525/comments","events_url":"https://api.github.com/repos/dotnet/performance/issues/525/events","html_url":"https://github.com/dotnet/performance/pull/525","id":450368827,"node_id":"MDExOlB1bGxSZXF1ZXN0MjgzNzAzMDAz","number":525,"title":"Add SpanJson to the JSON microbenchmarks","user":{"login":"Tornhoof","id":7989549,"node_id":"MDQ6VXNlcjc5ODk1NDk=","avatar_url":"https://avatars1.githubusercontent.com/u/7989549?v=4","gravatar_id":"","url":"https://api.github.com/users/Tornhoof","html_url":"https://github.com/Tornhoof","followers_url":"https://api.github.com/users/Tornhoof/followers","following_url":"https://api.github.com/users/Tornhoof/following{/other_user}","gists_url":"https://api.github.com/users/Tornhoof/gists{/gist_id}","starred_url":"https://api.github.com/users/Tornhoof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tornhoof/subscriptions","organizations_url":"https://api.github.com/users/Tornhoof/orgs","repos_url":"https://api.github.com/users/Tornhoof/repos","events_url":"https://api.github.com/users/Tornhoof/events{/privacy}","received_events_url":"https://api.github.com/users/Tornhoof/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-05-30T15:35:58Z","updated_at":"2019-06-27T23:45:49Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/dotnet/performance/pulls/525","html_url":"https://github.com/dotnet/performance/pull/525","diff_url":"https://github.com/dotnet/performance/pull/525.diff","patch_url":"https://github.com/dotnet/performance/pull/525.patch"},"body":"Motivation:\r\nEven closer in a technology to corefx than e.g. Utf8Json or JIL.\r\n- The value parsers in SpanJson are pretty much direct from corefx, except for DateTime\r\n- Similar methods to reduce memory allocations as in the corefx serializer (Span etc.)\r\n\r\nInitial Performance comparison:\r\n- SpanJson has apparently performance problems with the string in FormattedDate in  ``MyEventsListerViewModel``, it's a bit slow there, not yet looked into that in detail.\r\n- Memory allocations in that generic Dictionary<int,string> case are not ideal, I specifically added support for integer keys for in 2.0.12, this was not supported before.\r\n- In general serialization performance is about the same as Utf8Json, deserialization is usually a bit faster\r\n\r\nAs SpanJson only supports .NET Core 2.1+, the source code is only included for that TargetFrameworkIdentifier. The source code files are partial classes with name netcoreapp (this namiong appears to be used in other repositories). For the _ToStream and _FromStream implementations it uses the Async API of SpanJson, SpanJson does not provide a sync version for them.\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/performance/issues/comments/506549690","html_url":"https://github.com/dotnet/performance/pull/525#issuecomment-506549690","issue_url":"https://api.github.com/repos/dotnet/performance/issues/525","id":506549690,"node_id":"MDEyOklzc3VlQ29tbWVudDUwNjU0OTY5MA==","user":{"login":"billwert","id":4523120,"node_id":"MDQ6VXNlcjQ1MjMxMjA=","avatar_url":"https://avatars3.githubusercontent.com/u/4523120?v=4","gravatar_id":"","url":"https://api.github.com/users/billwert","html_url":"https://github.com/billwert","followers_url":"https://api.github.com/users/billwert/followers","following_url":"https://api.github.com/users/billwert/following{/other_user}","gists_url":"https://api.github.com/users/billwert/gists{/gist_id}","starred_url":"https://api.github.com/users/billwert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billwert/subscriptions","organizations_url":"https://api.github.com/users/billwert/orgs","repos_url":"https://api.github.com/users/billwert/repos","events_url":"https://api.github.com/users/billwert/events{/privacy}","received_events_url":"https://api.github.com/users/billwert/received_events","type":"User","site_admin":false},"created_at":"2019-06-27T23:45:49Z","updated_at":"2019-06-27T23:45:49Z","author_association":"COLLABORATOR","body":"@Tornhoof thanks! Can you share the output of running the tests please?"}}
{"actor":{"display_login":"billwert"}}