Outrageous memory usage with cElementTree (found it)

Denis Leroy denis at poolshark.org
Sat Apr 8 15:35:09 UTC 2006


Shahms King wrote:
> The problem is not with ElementTree, but can be traced to a specific
> regular expression:
> 
> _escape = re.compile(u'[&<>"\x80-\uffff]+')
> I suspect it's a bug/misplaced optimization in the re module,
> but haven't investigated any further than that.  The specific problem
> with the regular expression in the \x80-\uffff range.  Changing that to
> '\ufffa-\uffff' gets rid of the astronomical memory usage.  I'm going to
> keep looking into this as it's a particularly vexing bug ;-P
> 
> I've updated the bugzilla bug to reflect these changes.

nice catch




More information about the fedora-devel-list mailing list