This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients gvanrossum, methane, pitrou, scoder, serhiy.storchaka
Date 2018-01-12.11:23:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1515756205.45.0.467229070634.issue32346@psf.upfronthosting.co.za>
In-reply-to
Content
Here is a simple script creating 10000 classes (a large number, but perhaps not out of sight for a large application importing a lot of libraries (*)).

(*) see the experiment I did in https://mail.python.org/pipermail/python-dev/2017-December/151260.html

Before:
$ ./python-orig -I benchgcclasses.py 
GC time: 6.8 ms
RSS:
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
antoine  11248  0.0  0.3  41296 24576 pts/1    S+   12:18   0:00 ./python-orig -I benchgcclasses.py

After:
$ ./python -I benchgcclasses.py 
GC time: 6.9 ms
RSS:
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
antoine  11097  0.0  0.3  41300 24740 pts/1    S+   12:18   0:00 ./python -I benchgcclasses.py


RSS is a bit unstable from run to run, but roughly the patch seems to add 100 to 200KB in this case.

As for full GC time, it is quite stable and there's a 0.1ms increase with the patch.

Note this is really a worst-case benchmark: lots of classes, no methods, no user data beside the classes.
History
Date User Action Args
2018-01-12 11:23:25pitrousetrecipients: + pitrou, gvanrossum, scoder, methane, serhiy.storchaka
2018-01-12 11:23:25pitrousetmessageid: <1515756205.45.0.467229070634.issue32346@psf.upfronthosting.co.za>
2018-01-12 11:23:25pitroulinkissue32346 messages
2018-01-12 11:23:25pitroucreate