Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: > 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". ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue27535> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com