New submission from Zhipeng Xie <775350...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue39146>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to