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 erlendaasland
Recipients corona10, erlendaasland, miss-islington, pablogsal, petr.viktorin, phsilva, rhettinger, serhiy.storchaka, shihai1991, vstinner
Date 2021-04-14.08:24:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618388686.45.0.658208805533.issue40137@roundup.psfhosted.org>
In-reply-to
Content
Raymond:
> 1) move the expensive get_functools_state_by_type() inside the code block that creates new links, so that it won't affect a full cache.

This should be as easy as adding a _functools_state pointer to struct lru_cache_object, init that pointer in lru_cache_new(), and then fetch it from self in infinite_lru_cache_wrapper() and bounded_lru_cache_wrapper(), no? Diff attached.
History
Date User Action Args
2021-04-14 08:24:46erlendaaslandsetrecipients: + erlendaasland, rhettinger, vstinner, phsilva, petr.viktorin, serhiy.storchaka, corona10, pablogsal, miss-islington, shihai1991
2021-04-14 08:24:46erlendaaslandsetmessageid: <1618388686.45.0.658208805533.issue40137@roundup.psfhosted.org>
2021-04-14 08:24:46erlendaaslandlinkissue40137 messages
2021-04-14 08:24:46erlendaaslandcreate