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 serhiy.storchaka
Recipients WildCard65, christian.heimes, ronaldoussoren, serhiy.storchaka, terry.reedy, xxm
Date 2021-01-18.10:54:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610967243.36.0.221499287736.issue42887@roundup.psfhosted.org>
In-reply-to
Content
Yes, there is an overhead of using the trashcan mechanism. This is why it is only used in data collections, because it is expected that your data can contain arbitrary long chains of links. There is many ways to create arbitrary long chains with other objects, but it does not happen in common code. For methods the cost would be especially high, because method objects are usually short-lived and the performance of creating/destroying is critical.

AFAIK the same issue (maybe not with __sizeof__, but with other method of the basic object class, like __reduce__) was already reported earlier. I propose to close  this issue as "won't fix".
History
Date User Action Args
2021-01-18 10:54:03serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, ronaldoussoren, christian.heimes, WildCard65, xxm
2021-01-18 10:54:03serhiy.storchakasetmessageid: <1610967243.36.0.221499287736.issue42887@roundup.psfhosted.org>
2021-01-18 10:54:03serhiy.storchakalinkissue42887 messages
2021-01-18 10:54:03serhiy.storchakacreate