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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.10
    • None
    • Querying
    • None
    • Fully Compatible
    • Query 2019-04-08, Query 2019-04-22, Query 2019-05-06

    Description

      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.

      Attachments

        Activity

          People

            arun.banala@mongodb.com Arun Banala
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: