-
-
Notifications
You must be signed in to change notification settings - Fork 36
Custom Entity Serializer #109
Copy link
Copy link
Open
Labels
affects-serializationSerialization-related issueSerialization-related issueenhancementEnhancements & featuresEnhancements & featuresmajor-changeMajor changes requiredMajor changes required
Milestone
Metadata
Metadata
Assignees
Labels
affects-serializationSerialization-related issueSerialization-related issueenhancementEnhancements & featuresEnhancements & featuresmajor-changeMajor changes requiredMajor changes required
Continuing from the ideas of #87 , it is probably worthwhile to make a custom entity serializer that uses the
EntityDefinitionrather thanBsonClassMap. Every type that gets an entity definition would automatically get this new serializer applied to it and all of its properties.While I don't have any specific numbers at the moment, I think there is a good chance to squeeze a lot better performance while lowering allocations.
Ultimately this would still need to use the
BsonSerializerRegistryand be otherwise compatible with the default serializer system in the MongoDB driver.First, this should start with a benchmark of the current serialization system to see what we are dealing with.