[issue40496] re.findall() takes a long time (100% cup usage) on Python 3.6.10

Rémi Lapeyre report at bugs.python.org
Mon May 4 06:10:21 EDT 2020


Rémi Lapeyre <remi.lapeyre at henki.fr> added the comment:

I don't think this is a deadlock rather it is certainly related to the number of '*' there is in your pattern, the regexp has to search an exponentially growing number of patterns. 

You could try a simple pattern to match your attribute and it should be faster.

----------
nosy: +remi.lapeyre

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40496>
_______________________________________


More information about the Python-bugs-list mailing list