Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of functools.lru_cache on methods can lead to memory leaks #63

Closed
jg-rp opened this issue Aug 13, 2022 · 0 comments
Closed

Use of functools.lru_cache on methods can lead to memory leaks #63

jg-rp opened this issue Aug 13, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@jg-rp
Copy link
Owner

jg-rp commented Aug 13, 2022

As reported by flake8-bugbear, liquid.context.Context used functools.lru_cache on its filter method, which can cause Context instances to stay in memory after they are no longer needed.

Benchmarks show that this particular cache is not providing any improvement in performance, so we can simply remove it.

@jg-rp jg-rp added the bug Something isn't working label Aug 13, 2022
@jg-rp jg-rp closed this as completed in 7982d4f Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant