[SERVER-44098] Pass only number of keys in shouldMarkIndexAsMultiKey Created: 18/Oct/19 Updated: 29/Oct/23 Resolved: 22/Oct/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Geert Bosch | Assignee: | Geert Bosch |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Execution Team 2019-11-04 |
| Participants: |
| Description |
|
In AbstractIndexAccessMethod::insert/update and a few other places, we call shouldMarkIndexAsMultikey passing a vector of keys. Because the caller only has a set, it needs to copy all keys into a vector. However, shouldMarkIndexAsMultikey really only needs to know the number of keys, so we should stop passing the vector and doing the conversion. Fixing this adds 3.3% to validation speed, and should speed up index operations in general. |
| Comments |
| Comment by Githook User [ 22/Oct/19 ] |
|
Author: {'name': 'Geert Bosch', 'username': 'GeertBosch', 'email': 'geert.bosch@mongodb.com'}Message: |