Optimizing results sort operation #258

drslump opened this Issue Sep 9, 2011 · 0 comments


None yet

1 participant

drslump commented Sep 9, 2011

I don't know ruby (is in my todo list) so I might be completely wrong about this, I've seen however what I think could be a very easy way to improve the sorting performance.

Since it uses sorted_by with an array containing the longest match and last modification time of the item, I assume that this operations are performed for every entry in the set but are only actually needed when the scores between two items are equal. Thus it might result in a faster sort operation if these operations are only executed when needed, even if it requires caching the values temporally to avoid multiple calls by the language sorting algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment