[SERVER-27309] Replace dynamic_cast calls where possible in pipeline/* code Created: 06/Dec/16  Updated: 06/Dec/22  Resolved: 07/Dec/16

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: James Wahlin Assignee: Backlog - Query Team (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
duplicates SERVER-22403 Clean up dynamic_cast's in pipeline d... Backlog
Assigned Teams:
Query
Participants:
Linked BF Score: 0

 Description   

We use dynamic_cast in many places under db/pipeline to determine whether a pipeline stage is of a certain type and in some cases invoke methods on the DocumentSource subclass instance returned. Several locations show up as a hotspot under VTune when running the "Aggregation.Lookup" mongo-perf micro-benchmark. We should look to replace dynamic_cast usage with a more performant mechanism.



 Comments   
Comment by Charlie Swanson [ 07/Dec/16 ]

james.wahlin, this actually looks like a duplicate of one I filed a while ago: SERVER-22403. I'll bump that one back into "Needs Triage" since it showed up in the performance profiling.

Generated at Thu Feb 08 04:14:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.