[New-bugs-announce] [issue39146] to much memory consumption in re.compile unicode
Zhipeng Xie
report at bugs.python.org
Sat Dec 28 04:20:29 EST 2019
New submission from Zhipeng Xie <775350901 at qq.com>:
when running the following script, we found python2 comsume a lot memory while python3 does not have the issue.
import re
import time
NON_PRINTABLE = re.compile(u'[^\U00010000-\U0010ffff]')
time.sleep( 30 )
python2:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6943 root 20 0 109956 93436 3956 S 0.0 1.2 0:00.30 python
python3:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6952 root 20 0 28032 8880 4868 S 0.0 0.1 0:00.02 python3
----------
components: Library (Lib)
messages: 358936
nosy: Zhipeng Xie
priority: normal
severity: normal
status: open
title: to much memory consumption in re.compile unicode
type: resource usage
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39146>
_______________________________________
More information about the New-bugs-announce
mailing list