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

Improve speed of computing shape hash for MatchExpression

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

      We have two similar ideas here worth exploring:

      First, similar to this idea: https://github.com/mongodb/mongo/commit/525b08e5016fd1d194943215269cc027c5b8c57b

      We could make a custom hasher which will hash combine "shapified" literals rather than the actual literal values.

      Second, we could take the idea william.qian@mongodb.com wrote in this comment and perform some hashing as we go. I think this would likely save on some of the tech debt code duplication I'm imagining in the first idea, but I'm not sure how much it would improve perf if we are still building a BSON object which I don't think we actually need? If the idea is to hook it into the parser itself then it could definitely be faster but I'm not sure about the complexity without looking further.

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: