Message385987
I agree. There is no catastrophic backtracking here (it was fixed in issue39503), but the complexity of matching the regular expression is linear. Searching the pattern in a sequence of commas has quadratic complexity, because every step has linear complexity and we advance only one character at every attempt.
The proposed solution looks correct to me and fixes the issue. Yeting Li, do you mind to create a pull request for it? I can do it myself, but since you have found the problem and the solution, it would be better if the commit be attributed to you. |
|
Date |
User |
Action |
Args |
2021-01-30 16:32:06 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, orsenthil, yetingli |
2021-01-30 16:32:06 | serhiy.storchaka | set | messageid: <1612024326.64.0.0986572248493.issue43075@roundup.psfhosted.org> |
2021-01-30 16:32:06 | serhiy.storchaka | link | issue43075 messages |
2021-01-30 16:32:06 | serhiy.storchaka | create | |
|