[issue30800] zlib.compressobj took too much memory on window

2021-04-21 Thread Inada Naoki


Change by Inada Naoki :


--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30800] zlib.compressobj took too much memory on window

2021-04-20 Thread Irit Katriel


Irit Katriel  added the comment:

It looks like you're not using this API correctly, it doesn't make sense to 
create 1 compressobj()s.   You should create one and then call compress() 
on it as many times as you need.

--
nosy: +iritkatriel
resolution:  -> not a bug
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30800] zlib.compressobj took too much memory on window

2017-06-28 Thread dennis

New submission from dennis:

I'm working on a MMORPG Game server, and using the 32bit window 
Python(Python2.7.9 and Python3.6.0).
And i create a zlib.compressobj for every connection.

when the connection reach about 7500, the program raise an MemoryError 
exception. The Program only took me 700MB in memory, But the committed memory 
is about 2GB.
Here is my test result and test code:
---test result--
7613 compressobj created!
('memory info:', pmem(rss=736342016, vms=2057256960, num_page_faults=179812, pea
k_wset=736342016, wset=736342016, peak_paged_pool=130760, paged_pool=130584, pea
k_nonpaged_pool=28344, nonpaged_pool=28344, pagefile=2057256960, peak_pagefile=2
057256960, private=2057256960))

--test code 
# -*- encoding:utf-8 -*-

import os
import psutil
import zlib

def test():
result = []
for i in range(1):
try:
result.append(zlib.compressobj())
except:
print('%d compressobj created!'%(i))
pid = os.getpid()
p = psutil.Process(pid)
print('memory info:', p.memory_info())
break


if __name__ == '__main__':
test()

--
components: Windows
messages: 297257
nosy: dennisding, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: zlib.compressobj took too much memory on window
type: resource usage
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com