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
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
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
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12775
___
___
Python-bugs-list
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
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12775
___
___
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
___
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
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
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.
--
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?
--
___
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
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.
--
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()
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
___
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.
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
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
18 matches
Mail list logo