Commit Graph

6 Commits

Author SHA1 Message Date
Bryan Schumaker
8e4b3dfbfe libsaria: Don't track cache misses
Each cache miss will add a new word to either the format cache or the
substring cache.  I can look at the size of the caches to determine the
number of misses rather than keep track of this with a new variable.
2011-12-28 10:23:17 -05:00
Bryan Schumaker
147a212809 libsaria: Format to a set of words
I don't care about the order of words for indexing, and I don't need
duplicates either.  Formatting to a unique set of words should make
things a little faster.
2011-12-28 10:15:08 -05:00
Bryan Schumaker
abfd67cc84 libsaria: Refresh index while scanning
This keeps the index up-to-date with the library.  Tracks are indexed as
they are scanned, then the current filter string is run through the
index again to update it.
2011-12-27 23:02:09 -05:00
Bryan Schumaker
1d3baa79d5 libsaria: Implement index::rand()
Needed to get a random song from the index when filtered.
2011-12-27 22:41:54 -05:00
Bryan Schumaker
83488dfa06 libsaria: Add filtering to the new index
Otherwise it's useless.  I search all three indexes and use the union of
those results to determine what is visible.
2011-12-27 22:30:38 -05:00
Bryan Schumaker
9c749e4ade libsaria: Began new index
Right now I just add songs to it and cache substrings for each word.  I
also print out stats during libsaria shutdown.
2011-12-27 19:42:46 -05:00