[docs] [issue12775] immense performance problems related to the garbage collector

Charles-François Natali report at bugs.python.org
Thu Aug 18 16:02:29 CEST 2011

Charles-François Natali <neologix at 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 short python script that demonstrates the issue, the JSON
> file in this case is 1.2GB large:

A couple remarks:
- please indicate the Python version you're using
- you should put your test in a script, one with gc.disable() at the top, to avoid using any cache that might be used internally by cjson
- you should perform "echo 3 > /proc/sys/vm/drop_cache" before each run to make sure you start with a cold page/buffer cache (see how fast your file got read the second time you called read_json_blob()?)

nosy: +loewis, neologix, pitrou

Python tracker <report at bugs.python.org>

More information about the docs mailing list