Erlend Egeberg Aasland <erlend.aasl...@innova.no> added the comment:
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. ---------- nosy: +erlendaasland Added file: https://bugs.python.org/file49958/patch.diff _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40137> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com