Skip to content

Micro-optimizations for STJ generated source #52218

@layomia

Description

@layomia
  • Consider public option for honoring runtime-provided custom converters
  • Consider moving custom converter verification source to common helper
  • When fetching runtime-provided customers, use a dictionary lookup (rather than for-loop) when JsonSerializerOptions.Converters count > ~15
  • Make JsonSerializerContext.GetTypeInfo(Type) derived implementation based on dictionary-lookup if root-serializable type count > 64 (cf. https://github.com/dotnet/runtime/pull/81239/files#r1088396569)

Metadata

Metadata

Assignees

Labels

Priority:3Work that is nice to havearea-System.Text.JsonenhancementProduct code improvement that does NOT require public API changes/additionssource-generatorIndicates an issue with a source generator feature

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions