[GODRIVER-2023] Optimizing CompressorNoOp in Connection.CompressWireMessage() Created: 23/May/21 Updated: 28/Oct/23 Resolved: 22/Jun/22 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | 1.5.2 |
| Fix Version/s: | 1.10.0 |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Tim Fogarty | Assignee: | Qingyang Hu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | Reduce Allocations |
| Quarter: | FY23Q2, FY23Q3 |
| Description |
|
In Connection.CompressWireMessage() we currently copy src into dst when using no compression:
Can we just set dst = src? I made this change and tested with mongorestore and it seemed to work fine, but I'm wondering if the underlying array can be mutated through dst at a later point which would cause problems for code still using src.
|
| Comments |
| Comment by Qingyang Hu [ 22/Jun/22 ] |
|
Fixed in GODRIVER-2259 |