This takes a long time in the preprocessing part before regexp matching. I think this process is O(n) for the length n of the input string. Since Regexp.timeout= is a countermeasure against super-linear behavior, I feel this is not a big deal. And frankly, I can't think of a good idea to fix it.
It is also known that the timeout do not work for very large regexps that contain no instruction that checks timeouts. Maybe I should update the documentation?
This takes a long time in the preprocessing part before regexp matching. I think this process is O(n) for the length n of the input string. Since Regexp.timeout= is a countermeasure against super-linear behavior, I feel this is not a big deal. And frankly, I can't think of a good idea to fix it.
It is also known that the timeout do not work for very large regexps that contain no instruction that checks timeouts. Maybe I should update the documentation?
Let me know if anyone has a nice idea to fix it.
Got it, makes complete sense. A note in the docs about it would be helpful though.