[SERVER-30112] OplogBufferCollection::pushAllNonBlocking should use vector::reserve Created: 12/Jul/17 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 3.5.9 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Randolph Tan | Assignee: | Backlog - Replication Team |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Replication
|
| Participants: |
| Description |
|
Instead of filling the vector with default constructed objects, and then throwing them out by calling std::transform: https://github.com/mongodb/mongo/blob/r3.5.9/src/mongo/db/repl/oplog_buffer_collection.cpp#L178 Once this done, the default constructor for InsertStatement can also be removed: |