[SERVER-40083] Don't recompile each time $regex is evaluated when regex argument is a constant Created: 11/Mar/19 Updated: 29/Oct/23 Resolved: 26/Apr/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.10 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ian Boros | Assignee: | Arun Banala |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Query 2019-04-08, Query 2019-04-22, Query 2019-05-06 |
| Participants: |
| Description |
|
This is follow-on work for
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. |
| Comments |
| Comment by Githook User [ 26/Apr/19 ] |
|
Author: {'email': 'arun.banala@mongodb.com', 'name': 'Arun Banala', 'username': 'banarun'}Message: |
| Comment by Githook User [ 23/Apr/19 ] |
|
Author: {'name': 'Ian Boros', 'username': 'puppyofkosh', 'email': 'puppyofkosh@gmail.com'}Message: Revert " This reverts commit a60f6a53734fa3a022e9ba39bbdab95608ba9108. |
| Comment by Githook User [ 23/Apr/19 ] |
|
Author: {'name': 'Ian Boros', 'username': 'puppyofkosh', 'email': 'puppyofkosh@gmail.com'}Message: Revert " This reverts commit 0e367bc76f23d6d876caa00a47700b3634402817. |
| Comment by Githook User [ 23/Apr/19 ] |
|
Author: {'name': 'Arun Banala', 'username': 'banarun', 'email': 'arun.banala@mongodb.com'}Message: |
| Comment by Githook User [ 23/Apr/19 ] |
|
Author: {'email': 'arun.banala@mongodb.com', 'name': 'Arun Banala', 'username': 'banarun'}Message: |