Skip to content

Avoid reflection in IStructuralReadWrite.Read #2669

@joshua-spacetime

Description

@joshua-spacetime

That is, fix this TODO:

// TODO: use `RuntimeHelpers.GetUninitializedObject` as an optimisation here.
// We tried but couldn't do this because BitCraft relies on being able
// to add and initialize custom fields on autogenerated classes.

Currently each row object is instantiated using reflection during deserialization which represents a significant portion of the total cost as the following profile snippet demonstrates.

Image

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions