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

Antoine Pitrou report at bugs.python.org
Thu Aug 18 16:29:23 CEST 2011

Antoine Pitrou <pitrou at 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 excellent, it is quite rare for it to be GC-limited, so the advice you are suggesting we give would be misleading for most use cases.

Note that instead of disabling the GC, you can tune its parameters by calling set_threshold. For example:

  u, v, w = gc.get_threshold()
  gc.set_threshold(u, v * 10, w * 50)

(this will make full collections occur 500 times less often)

Or you could disable the GC only when decoding JSON data and reenable it afterwards.


Python tracker <report at bugs.python.org>

More information about the docs mailing list