[SERVER-16574] Do not call Explain::getPlanSummary on every insert/update, or eliminate its allocating behavior Created: 17/Dec/14 Updated: 23/Jan/15 Resolved: 15/Jan/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Write Ops |
| Affects Version/s: | 2.8.0-rc2 |
| Fix Version/s: | 3.0.0-rc6 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Andy Schwerin | Assignee: | David Storch |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
Explain::getPlanSummary generates a new std::string of moderate size, and the heap allocation and freeing around the lifetime of that string are an unnecessary performance hit on hot code paths such as CRUD operations. If we're going to keep doing it, we need to make it closer to free. Better might be not to generate the summary string in the common case. |
| Comments |
| Comment by Githook User [ 15/Jan/15 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: This removes a potentially expensive string allocation from every update operation. |