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 jbfzs, r.david.murray, rhettinger, serhiy.storchaka, vstinner, Александр Карпинский
Date 2017-11-21.16:08:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511280494.01.0.213398074469.issue27535@psf.upfronthosting.co.za>
In-reply-to
Content
> While I don't see how we can avoid "leaking memory" (growing the registry) for actions like "once", I think that it's ok to don't touch the registry for the "ignore" action. So at least, an application ignoring ResourceWarning will not leak anymore.

This is a caching for speed. If the same line of code emits the same warning, it is enough to tests the registry and don't apply all warning filters.

I think we should find better compromise between performance if all messages equal and memory usage if all messages are different. Since caching for the "ignore" action affects only performance, not semantic, we could check whether there are too much warnings for the "ignore" action are cached in the same line. The problem is how to make this effectively. And what is "too much".
History
Date User Action Args
2017-11-21 16:08:14serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, vstinner, r.david.murray, Александр Карпинский, jbfzs
2017-11-21 16:08:14serhiy.storchakasetmessageid: <1511280494.01.0.213398074469.issue27535@psf.upfronthosting.co.za>
2017-11-21 16:08:13serhiy.storchakalinkissue27535 messages
2017-11-21 16:08:13serhiy.storchakacreate