[SERVER-27171] Add operator<<(bool) to StringBuilderImpl Created: 23/Nov/16 Updated: 05/Apr/17 Resolved: 28/Nov/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Performance |
| Affects Version/s: | 3.4.0-rc4 |
| Fix Version/s: | 3.4.1, 3.5.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | James Wahlin | Assignee: | James Wahlin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Completed: | |||||||||||||
| Sprint: | Query 2016-12-12 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 0 | ||||||||||||
| Description |
|
Running the "Queries.IntNonIdFindOne" mongo-perf test while profiling mongod under VTune shows the StringBuilderImpl operator<<(int) as a significant hotspot. This stems from writing boolean values to StringBuilder in the read/update/delete path during query planning. As we don't implement a boolean stream handler, booleans are handled as type int, and are written inefficiently via snprintf. A boolean operator can be written that will perform the same action in a (much) more efficient manner. |
| Comments |
| Comment by Githook User [ 06/Dec/16 ] |
|
Author: {u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}Message: (cherry picked from commit 3c5671874c56a4b7866fda9bec9c233d3f754313) |
| Comment by Githook User [ 28/Nov/16 ] |
|
Author: {u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}Message: |