Summary
After a successful insert, Commit() returns commitDoc.ToCommit(_serializer). This means the write path serializes the commit to BSON for insert, then immediately deserializes the same BSON back to ICommit to return it — pure redundant work.
Why this matters
- Post-insert CPU and allocation overhead on every successful commit.
- The cost is independent of MongoDB round-trip latency.
- Likely noise relative to total write-path time, but worth quantifying before dismissing.
Proposed investigation
Reference
See docs/Performance-Investigation.md → Finding #5 for full context.
Summary
After a successful insert,
Commit()returnscommitDoc.ToCommit(_serializer). This means the write path serializes the commit to BSON for insert, then immediately deserializes the same BSON back toICommitto return it — pure redundant work.Why this matters
Proposed investigation
MemoryDiagnoser.ICommitfrom the original in-memory object instead of round-tripping through BSON.Reference
See
docs/Performance-Investigation.md→ Finding #5 for full context.