[SERVER-32302] for-each loop over BSONObj is slower than explicit BSONObjIterator in MatchExpressionParser code Created: 13/Dec/17 Updated: 30/Oct/23 Resolved: 04/Jan/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | 3.6.0 |
| Fix Version/s: | 3.6.7, 3.7.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kyle Suarez | Assignee: | Mathias Stearn |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Requested: |
v3.6
|
||||||||||||||||||||||||
| Sprint: | Platforms 2018-01-01, Platforms 2018-01-15 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||
| Description |
|
As a part of
into
This has caused a performance regression of roughly 5% when parsing a $in, and is apparent with very large in expressions. The real fix seems like achieving performance parity between the two ways to iterate through a BSONObj, but I'm not sure how much we want to dive down the rabbit hole in terms of seeing the machine code that's generated by the two constructs. |
| Comments |
| Comment by Githook User [ 23/Jul/18 ] |
|
Author: {'username': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}Message: This addresses the perf regression in update due to eagerly computing the (cherry picked from commit d30abf7c53a992635d82b226acbb649106f5dfa2) |
| Comment by Githook User [ 23/Jul/18 ] |
|
Author: {'username': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}Message: (cherry picked from commit 3c586a7c946ac7f9485b9ff978fa029ac4b5108e) |
| Comment by Githook User [ 23/Jul/18 ] |
|
Author: {'username': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}Message: (cherry picked from commit 0d38ef54970744aca3565fabbda76bd6e7836f7a) |
| Comment by Githook User [ 23/Jul/18 ] |
|
Author: {'username': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}Message: (cherry picked from commit 1497899f237dd60ad7313913c38c3f07fe168f2b) |
| Comment by Githook User [ 04/Jan/18 ] |
|
Author: {'name': 'Mathias Stearn', 'username': 'RedBeard0531', 'email': 'mathias@10gen.com'}Message: This addresses the perf regression in update due to eagerly computing the |
| Comment by Githook User [ 04/Jan/18 ] |
|
Author: {'name': 'Mathias Stearn', 'username': 'RedBeard0531', 'email': 'mathias@10gen.com'}Message: |
| Comment by Githook User [ 04/Jan/18 ] |
|
Author: {'name': 'Mathias Stearn', 'username': 'RedBeard0531', 'email': 'mathias@10gen.com'}Message: |
| Comment by Githook User [ 04/Jan/18 ] |
|
Author: {'name': 'Mathias Stearn', 'username': 'RedBeard0531', 'email': 'mathias@10gen.com'}Message: |
| Comment by Ian Whalen (Inactive) [ 15/Dec/17 ] |
|
Passing to Platforms to investigate the core cause of why the foreach loop is slower. |