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

Don't copy all of redis into memory #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

meekmichael
Copy link

This set of changes makes us keep the sums for each category
in their own redis key, and then when we need to get the scores for
a number of tokens, we fetch only those tokens plus that sum.

The :total key is created on the fly, so that existing Linnaeus redis stores can be upgraded.

For me, my spam filter application went from 0.35 to 0.008 seconds to check a message. A pretty big difference. Scaling will also improve with large and growing databases.

Michael Mittelstadt added 2 commits May 14, 2014 13:43
This set of changes makes us keep the sums for each category
in their own key, and then when we need to get the scores for
a number of tokens, we fetch only those tokens plus that sum.

The fetching of words is done via redis pipelining for speed.
* Adjust other specs to account for new ':total' keys
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.

1 participant