[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41155: 26.3; regexp 99% locks up emacs
From: |
Paul Eggert |
Subject: |
bug#41155: 26.3; regexp 99% locks up emacs |
Date: |
Tue, 12 May 2020 13:56:05 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
> I originally put it down to the regexp being clearly pathalogical
Yes, that's pretty much it. Emacs uses a backtracking matcher and its worst case
performance is exponential. You can even use the matcher to solve Diophantine
integer equations ... verrrryy slowly; see:
http://blog.stevenlevithan.com/archives/algebra-with-regexes
So, don't do that. (Or if you *do* want to do that, fix the matcher - but good
luck with that....)