[SERVER-76173] Memoize duplicate field checks in IDL-generated parsers Created: 17/Apr/23  Updated: 02/May/23  Resolved: 02/May/23

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

Type: Task Priority: Major - P3
Reporter: Vojislav Stojkovic Assignee: Vojislav Stojkovic
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: Service Arch 2023-05-01, Service Arch 2023-05-15
Participants:

 Description   

Parsers generated from IDL check the BSON document for duplicate fields. This check is performed more than once for the same BSON document when it's parsed by different parsers. After the first time this check is performed, we should skip subsequent checks.

The work done in SERVER-75866 shows that even though this change might not yield any significant improvements in the ops_per_sec performance measurements for industry benchmarks, the change does reduce the time we spend inside the initializeAPIParameters function both on ARM and Intel.



 Comments   
Comment by Vojislav Stojkovic [ 02/May/23 ]

During the discussion about performance testing accuracy, the consensus was that we should err on the side of inaction. Since this change does not improve ops/sec metrics, there's not enough justification to implement it.

Generated at Thu Feb 08 06:32:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.