[SERVER-82511] WiredTigerRecordStore::seek recomputes table URI string length each time Created: 27/Oct/23 Updated: 02/Feb/24 Resolved: 02/Feb/24 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 8.0.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ian Boros | Assignee: | Louis Williams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Storage Execution
|
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Execution Team 2024-02-05 |
| Participants: |
| Description |
This line of code implicitly constructs a StringData from a const char*, which results in a call to strlen every time we seek on a record store cursor. While this is not an enormous cost, it has shown up in some profiles I've taken. |
| Comments |
| Comment by Githook User [ 02/Feb/24 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louiswilliams@users.noreply.github.com', 'username': 'louiswilliams'}Message: GitOrigin-RevId: e0a274c101cab2c75048a2186a93a4bc3f48aa57 |
| Comment by Ian Boros [ 27/Oct/23 ] |
|
It might make sense to just record these metrics in one go, when the cursor is destroyed, rather than one at a time in every seek/next call. |