-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Context
GODRIVER-2976 changed the raw bytes pattern used by the bson.valueReader to use a standard library io.Reader implementation, which supports streaming. We've had users note that this introduces a performance regression, notably due to allocations required in the lower-level unexported read* operations. PR #2120 proposes that we create two byte sources for value reader: one for buffers to be used as an under-the-hood optimization and one for streaming to avoid a breaking change.
Definition of done
We should decide if we want to maintain both buffered and streaming valueReader solutions in V3. If so, we should deprecate bson.NewDocumentReader and add the following constructors:
- bson.NewBufferedDocumentReader
- bson.NewStreamingDocumentReader
Pitfalls
Ideally we would only have one bytes provider for valueReader.
- related to
-
GODRIVER-3533 Buffer valueWriters while encoding
-
- Closed
-
-
GODRIVER-3587 Revert bufio Usage in bson ValueReader for Improved Performance
-
- In Code Review
-
-
GODRIVER-2976 Remove or un-export all currently deprecated BSON code in Go Driver 2.0
-
- Closed
-