Investigate if MozJS can avoid extra BSON conversions when input is already BSON

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      While looking into moving fuzzer comparison logic to shell helpers, I noticed that most of the time spent wasn't in comparing results, but converting the input to BSON for our shell helpers. I've seen this conversion take ~400-500ms for deeply nested objects.

      However the input to the shell helper came from a query and is already BSON. The fast-path we have to avoid the extra conversion is not taken. We should investigate why the conversions take so long and if we can avoid unnecessary conversions from BSON to a MozJS structure, back to BSON.

      Even if we don't move more logic from JS to C++, this work will still be done when we use any existing helpers in the fuzzer. Here is an example.

            Assignee:
            Matt Boros
            Reporter:
            Matt Boros
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: