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

Fix memory leak caused by defaultdict access in suggestions feature #1188

Merged

Conversation

user202729
Copy link
Member

@user202729 user202729 commented Mar 3, 2021

Summary of changes

Fixes a memory leak in the suggestions feature.

The leak only become apparent to me when I use the new console GUI. (normally I never use the suggestions window)

Remark: when I use the console GUI, I occasionally get a hang too. I guess it's caused by either dict rehash or garbage collection.

Pull Request Checklist

  • Changes have tests -> Will have later. Idea: count the number of items in the dicts after an nonexistent reverse lookup.
  • News fragment added in news.d. See documentation for details -> TODO

@benoit-pierre
Copy link
Member

Nice catch, technically not a memory leak, but a case of unbounded memory use when using the suggestions. Can you add a news entry?

@morinted
Copy link
Member

morinted commented Apr 1, 2021

I've added a news fragment

@benoit-pierre benoit-pierre merged commit 5f236ba into openstenoproject:master Apr 1, 2021
@user202729 user202729 deleted the fix-leak-suggestions branch April 6, 2021 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants