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: Improve caching of dictionaries #5105

Merged
merged 3 commits into from
Dec 23, 2023
Merged

fix: Improve caching of dictionaries #5105

merged 3 commits into from
Dec 23, 2023

Conversation

Jason3S
Copy link
Collaborator

@Jason3S Jason3S commented Dec 23, 2023

This change reduces dictionary reload for long running processes.

The dictionary loader uses a WeakMap to keep dictionaries. This is very effective for keeping the memory size down when using the command-line tool. But, it also throws out dictionaries too soon when the spell checker is used as part of a server. To address this, the dictionary loader keep the most recent 10-20 loaded dictionaries in memory.

This change reduces dictionary reload for long running processes.
@github-actions github-actions bot added the fix label Dec 23, 2023
@Jason3S Jason3S marked this pull request as ready for review December 23, 2023 20:34
@Jason3S Jason3S merged commit f38114d into main Dec 23, 2023
81 checks passed
@Jason3S Jason3S deleted the dev-perf branch December 23, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant