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 tim.peters
Recipients lemburg, luis@luispedro.org, methane, rhettinger, serhiy.storchaka, terry.reedy, tim.peters, twouters, vstinner
Date 2019-06-15.01:52:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1560563571.29.0.785238156168.issue32846@roundup.psfhosted.org>
In-reply-to
Content
Looks likely that the _major_ cause of the quadratic-time delete behavior was due to that obmalloc used a linear-time method to keep its linked list of usable arenas sorted in order of number of free pools.  When a pool became unused, its arena's count of free pools increased by one, and then order was restored by moving the arena "to the right" in the linked list, one slot at a time.

When there were only a few hundred arenas, nobody noticed.  But programs with thousands of arenas could suffer very noticeable sloth, and programs with hundreds of thousands could appear to hang (could require days to complete deleting).

This was fixed in issue #37029, using a constant-time method to restore sorted order, scheduled for release in Python 3.8.
History
Date User Action Args
2019-06-15 01:52:51tim.peterssetrecipients: + tim.peters, lemburg, twouters, rhettinger, terry.reedy, vstinner, luis@luispedro.org, methane, serhiy.storchaka
2019-06-15 01:52:51tim.peterssetmessageid: <1560563571.29.0.785238156168.issue32846@roundup.psfhosted.org>
2019-06-15 01:52:51tim.peterslinkissue32846 messages
2019-06-15 01:52:51tim.peterscreate