[SERVER-50642] Avoid constructing transient vector<BSONElement> when lexing input pipelines Created: 31/Aug/20  Updated: 29/Oct/23  Resolved: 08/Sep/20

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

Type: Improvement Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Nicholas Zolnierz
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Query 2020-09-07, Query 2020-09-21
Participants:

 Description   

Using the Array() method on a BSONElement results in a construction of a separate vector which we use to iterate and lex. This can be avoided by using embeddedObject() where the fieldnames are the indexes of the array.



 Comments   
Comment by Githook User [ 08/Sep/20 ]

Author:

{'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}

Message: SERVER-50642 Move to generic grammar.yy and avoid constructing vector of BSONElements in lexer
Branch: master
https://github.com/mongodb/mongo/commit/f265019ab76d4a73e19e3300b9e52bc927cc6bbe

Generated at Thu Feb 08 05:23:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.