[SERVER-12347] WriteBatchExecutor should re-use an UpdateDriver across all updates Created: 13/Jan/14  Updated: 05/May/14  Resolved: 16/Jan/14

Status: Closed
Project: Core Server
Component/s: Internal Code, Performance
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-12380 port update improvements to batch wri... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

In the current implementation of WriteBatchExecutor::execUpdate a new UpdateDriver object is implicitly created (under the write lock) for each update in the batch. Constructing an UpdateDriver is somewhat expensive.

However, an UpdateDriver object can be re-used, so it would be somewhat better if a single UpdateDriver object was created, than reset to handle each individual update operation in the batch. This would amortize the cost of UpdateDriver construction across all of the updates in the batch.

This would also have the nice side effect of hoisting UpdateDriver construction out of the write lock, as was done in the old update path.


Generated at Thu Feb 08 03:28:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.