Uh oh!
There was an error while loading. Please reload this page.
Fix delegate allocation in CachingContext.GetOrAddJsonTypeInfo - #80437
Conversation
ghost
commented
Jan 10, 2023
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis |
Uh oh!
There was an error while loading. Please reload this page.
| internal sealed class CachingContext | ||
| { | ||
| private readonly ConcurrentDictionary<Type, JsonTypeInfo?> _jsonTypeInfoCache = new(); | ||
| private readonly Func<Type, JsonTypeInfo?> _jsonTypeInfoFactory; |
There was a problem hiding this comment.
consider adding comment why we're doing this (it's one of the things I'd personally by default choose shorter code)
Thanks! Know when this will be released? (Just so I know when to watch out for it) |
eiriktsarpalis
commented
Jan 11, 2023
It should be available in the first preview release of .NET 8. @stephentoub@ericstj do you think this meets the bar for servicing? The issue would impact performance in applications that make heavy use of polymorphism. |
eiriktsarpalis
commented
Jan 11, 2023
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3895615065 |
@eiriktsarpalis backporting to release/7.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix delegate allocation in CachingContext.GetOrAddJsonTypeInfo
Applying: Address PR feedback
error: sha1 information is lacking or useless (src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.Caching.cs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Address PR feedback
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
@eiriktsarpalis an error occurred while backporting to release/7.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
…t#80437) * Fix delegate allocation in CachingContext.GetOrAddJsonTypeInfo * Address PR feedback
…ypeInfo (#80513) * Fix delegate allocation in CachingContext.GetOrAddJsonTypeInfo (#80437) * Fix delegate allocation in CachingContext.GetOrAddJsonTypeInfo * Address PR feedback * Ensure CachingContext.Options isn't being trimmed away. * Update servicing version Co-authored-by: Stephen Toub <stoub@microsoft.com>
Fixes#80430
Allocation regression from #71746