[SERVER-78003] Avoid dynamic_cast in $not serialization Created: 12/Jun/23 Updated: 29/Oct/23 Resolved: 26/Jun/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Charlie Swanson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | QO 2023-06-26 | ||||||||
| Participants: | |||||||||
| Description |
|
When looking at the performance profile for our new $queryStats workload, I noticed a lot of time spent in __dynamic_cast when computing the shape of {$exists: false} queries which translate into {$not: {$exists: true}}. It was this line, which doesn't seem to need to use dynamic_cast and can use `matchType()` to figure it out instead. I didn't see any other obvious usages of dynamic_cast in src/mongo/db/matcher's serialization functions. |
| Comments |
| Comment by Githook User [ 26/Jun/23 ] |
|
Author: {'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}Message: |