[SERVER-82940] Use tries for IDL enumeration lookups Created: 08/Nov/23  Updated: 07/Feb/24  Resolved: 07/Feb/24

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

Type: Improvement Priority: Major - P3
Reporter: Matthew Russotto Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: perf-8.0, perf-tiger, perf-tiger-handoff, perf-tiger-q4
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-85497 IDL: make gen_trie generate a complet... Closed
Duplicate
is duplicated by SERVER-81876 Improve IDL code generation for comma... Closed
Gantt Dependency
has to be done before SERVER-82941 Use IDL enumerations to decode comman... Needs Scheduling
Related
is related to SERVER-78439 Investigate IDL generated parser perf... Closed
is related to SERVER-81876 Improve IDL code generation for comma... Closed
Assigned Teams:
Service Arch
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2023-12-11, Service Arch 2024-02-05
Participants:
Linked BF Score: 150

 Description   

SERVER-78439 improved the performance of decoding field names in BSON objects over a simple series of if() statements, by using a trie to do the decoding and thus scanning the string only once. The same method can be used to decode enumeration values to improve performance there.



 Comments   
Comment by Githook User [ 07/Feb/24 ]

Author:

{'name': 'Billy Donahue', 'email': 'BillyDonahue@users.noreply.github.com', 'username': 'BillyDonahue'}

Message: SERVER-82940 1-liner fix bsonobj lifetime in benchmark (#18757)

GitOrigin-RevId: 7470781f37c438e70d3a1f2762ba80a5a30e2a97
Branch: master
https://github.com/mongodb/mongo/commit/b1989de9d97eeb852e7302d3e650b01c6eefbd6c

Comment by Githook User [ 30/Jan/24 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-82940 use trie for parsing IDL string enums

GitOrigin-RevId: d9c2db069faddf633cdf7eb81ca13ea1ababf7eb
Branch: master
https://github.com/mongodb/mongo/commit/741c19f225409cc08c400191b1ffc0a084948f3a

Comment by Jason Chan [ 11/Jan/24 ]

Re-opening since we decided to stick with the trie implementation, but will first wait on SERVER-83671 to move the trie implementation from python to C++ for better code maintenance.

Comment by Jason Chan [ 01/Dec/23 ]

Closing in favor of SERVER-81876

Comment by Judah Schvimer [ 29/Nov/23 ]

We should consider using a method like SERVER-81876 for even faster decoding.

Comment by Billy Donahue [ 28/Nov/23 ]

I think the tries as implemented in IDL right now should be backed out and rewritten as C++ containers before we expand their uses. I captured this as SERVER-83671.

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