-
Type:
Improvement
-
Resolution: Duplicate
-
Priority:
Unknown
-
None
-
Affects Version/s: 3.0.0
-
Component/s: None
-
None
-
🔵 Done
-
Dotnet Drivers
-
None
-
None
-
None
-
None
-
None
-
None
IBsonWriter doesn't accept writing ReadOnlySpan<byte> or ReadOnlyMemory<byte> and always requires a full byte array. This means that even though the driver supports declaring properties as ReadOnlyMemory<byte> the underlying serializer will eventually have to call bytes.ToArray() to copy the ROM.
I went down the path of exploring the change set and was thinking to do a community contribution but I realized it requires a few public type changes which might quickly become out of scope for a community contribution.
See https://github.com/danielmarbach/mongo-csharp-driver/commit/f3e96f2be1ff201456f7388522a5dc5736c85efb
- is duplicated by
-
CSHARP-5659 Add memory-efficient byte writing methods to IBsonWriter interface
-
- Backlog
-