Skip to content

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