[SERVER-50894] prefer pcrecpp to std::regex Created: 11/Sep/20 Updated: 29/Oct/23 Resolved: 12/Sep/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 4.8.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Billy Donahue | Assignee: | Billy Donahue |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | Service arch 2020-09-21 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 0 | ||||||||||||
| Description |
|
std::regex has extremely poor performance and cannot be improved due to ABI compatibility with its header-only implementation. It's also very bloated. Including its header brings in 20,000+ lines of C++. We're using pcrecpp for most regex work, and having a second implementation isn't necessary. |
| Comments |
| Comment by Githook User [ 12/Sep/20 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |
| Comment by Billy Donahue [ 11/Sep/20 ] |
|
This is a single-sweep cleanup. Should consider adding a soft ban on <regex> and std::regex via lint. |
| Comment by Billy Donahue [ 11/Sep/20 ] |