Don't recompile each time $regex is evaluated when regex argument is a constant

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.1.10
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • Query 2019-04-08, Query 2019-04-22, Query 2019-05-06
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This is follow-on work for SERVER-39695.

       

      Compiling a regex can be O(2^n) time (n being size of the regex). In most cases, users will probably run the same regex over and over. Recompiling the same regex over and over would be extremely silly, and in some cases may make the $regex operator completely useless.

            Assignee:
            Arun Banala
            Reporter:
            Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: