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

Add property to disable in-memory model cache #6

Merged
merged 4 commits into from May 26, 2017
Merged

Add property to disable in-memory model cache #6

merged 4 commits into from May 26, 2017

Conversation

@c-w
Copy link
Contributor

@c-w c-w commented May 8, 2017

Currently, the part-of-speech and lemmatizer models get cached in memory after they've been read from disk. This can lead to very high memory usage, especially if we have a single process that handles requests for many different languages.

This pull request adds a property called useModelCache that lets users disable the in-memory caching to reduce the memory usage at the expense of reading more data from disk. By default, the property is enabled so that the public API doesn't change from the previous behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants