Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-82433

Remove duplicate calls to VariableEnvironment::build

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • QE 2023-10-30, QE 2023-11-13
    • 100

      Running in a profiler shows that calling it twice is a performance hit

      Function Name	Total CPU [unit, %]	Self CPU [unit, %]	Module	Category
      | + mongo::stage_builder::abtToExpr	22583 (40,84%)	1 (0,00%)	mongod	Runtime
      || + mongo::stage_builder::constantFold	10808 (19,55%)	0 (0,00%)	mongod	Runtime
      ||| - mongo::optimizer::VariableEnvironment::build	8791 (15,90%)	0 (0,00%)	mongod	Runtime
      ||| - mongo::stage_builder::ExpressionConstEval::optimize	745 (1,35%)	0 (0,00%)	mongod	Runtime
      ||| - mongo::stage_builder::TypeChecker::typeCheck	597 (1,08%)	0 (0,00%)	mongod	Runtime
      ||| - mongo::optimizer::EvalPathLowering::optimize	535 (0,97%)	0 (0,00%)	mongod	Runtime
      ||| - mongo::optimizer::VariableEnvironment::~VariableEnvironment	139 (0,25%)	0 (0,00%)	mongod	Runtime
      ||| - ??@a3a9d768221a184941997bd5c97152c9@	1 (0,00%)	1 (0,00%)	mongod	
      || - mongo::optimizer::VariableEnvironment::build	8976 (16,23%)	0 (0,00%)	mongod	Runtime
      || - mongo::optimizer::SBEExpressionLowering::optimize	2673 (4,83%)	0 (0,00%)	mongod	Runtime
      || - mongo::optimizer::VariableEnvironment::~VariableEnvironment	122 (0,22%)	0 (0,00%)	mongod	Runtime
      
      

            Assignee:
            alberto.massari@mongodb.com Alberto Massari
            Reporter:
            alberto.massari@mongodb.com Alberto Massari
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: