[issue12775] immense performance problems related to the garbage collector

2011-08-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: For the record, the speed improvement in 2.7 likely results from 79276316b94b. GC used to be quadratic with the number of objects, and is now only linear. -- ___ Python tracker

[issue12775] immense performance problems related to the garbage collector

2011-08-19 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: 2.6 is in security fix only mode and the OP agrees not applicable to current -- nosy: +terry.reedy resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Daniel Svensson
New submission from Daniel Svensson dsvens...@gmail.com: I've noticed problems with the GC in two applications. In one case the application did not respond to SOAP-requests for 9 seconds, every couple of minutes, when it really shouldn't have taken more than 20ms. In another case we had one

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12775 ___ ___ Python-bugs-list

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Which version of Python did you test with? Can you try with version 3.2? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12775

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12775 ___ ___

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Can you try to write a short example to reproduce the problem? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12775 ___

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: There's been some work done on the GC some time ago to address this type of pattern (I think to reduce from quadratic complexity to amortized linear complexity). I'm adding Antoine and Martin who were involved in this. Here is a

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: As Charles-François said: it would be nice to know which Python version you are using. Also, if you could test with 2.7 or 3.2 and the standard json module (or the latest simplejson if you prefer). Also, while Python's performance is not always

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Daniel Svensson
Daniel Svensson dsvens...@gmail.com added the comment: The bug note contains a test script. You just have to generate a huge JSON-blob, or allocate 1 GB or so and pickle it down to file and replace the cjson.decode to pickle.loads, pickle is about 20 times faster without GC. --

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Daniel Svensson
Daniel Svensson dsvens...@gmail.com added the comment: Or you could disable the GC only when decoding JSON data and reenable it afterwards. JSON was just an example, and disabling/enabling the GC is not safe in a multithreaded environment? -- ___

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The bug note contains a test script. You just have to generate a huge JSON-blob, or allocate 1 GB or so and pickle it down to file and replace the cjson.decode to pickle.loads, pickle is about 20 times faster without GC. You can't say that

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Daniel Svensson
Daniel Svensson dsvens...@gmail.com added the comment: Working on getting a reasonable large file to test with on my laptop where I have 2.6, 2.7, 3.2. The Python version where the problem became apparent was 2.5.2 as the software is deployed on Debian Lenny. --

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Daniel Svensson
Daniel Svensson dsvens...@gmail.com added the comment: using: (except in python2.5 case where simplejson is used, which ought to be the same thing right?) import time, gc, json, sys def read_json_blob(): t0 = time.time() fd = open(datatest1.json) data = fd.read()

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Daniel Svensson
Changes by Daniel Svensson dsvens...@gmail.com: -- versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12775 ___

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: IIRC the C acceleration for json were added in 2.7/3.2, and are used automatically when you import json. In the previous releases the json module was implemented in pure Python. That explains why it's much slower on Python 2.5/6.

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Daniel Svensson
Daniel Svensson dsvens...@gmail.com added the comment: Yes, but this ticket was only opened due to time delta between no-gc and gc, not as much absolute time, but that's a nice improvement. -- ___ Python tracker rep...@bugs.python.org

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: So overall it looks like it's less of a problem in newer versions of Python. We are phasing out the software that is deployed on Debian Lenny so it's a problem that will go away. I don't think I have any objections with closing this ticket