Browse Source
Profiling showed that WeakValueDictionary caused rather significant and noticeable slowdowns during startup. Since the only thing it was used for was to automatically remove the key from the mapping when the reference count reaches zero, the same could theoretically be accomplished by using the __del__ special method. There is a chance that this could lead to a memory leak since the __del__ method is not always called, but the only instances of this happening are during interpreter shutdown to my knowledge and at that point the mapping is the least of my concern.pull/7190/head
2 changed files with 44 additions and 6 deletions
Loading…
Reference in new issue