summaryrefslogtreecommitdiff
path: root/apps/tagcache.h
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-04-18 18:56:56 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-04-18 18:56:56 +0000
commitfa893c6b88d823dcdd3c746a94cfcde9765342cd (patch)
tree3aea16925a89b78f80dce844ce48d8e8fea60a22 /apps/tagcache.h
parent2b18727a8abe08cf5f9d267d5f664bff13bd1cb2 (diff)
downloadrockbox-fa893c6b88d823dcdd3c746a94cfcde9765342cd.zip
rockbox-fa893c6b88d823dcdd3c746a94cfcde9765342cd.tar.gz
rockbox-fa893c6b88d823dcdd3c746a94cfcde9765342cd.tar.bz2
rockbox-fa893c6b88d823dcdd3c746a94cfcde9765342cd.tar.xz
Performance optimizations for tagcache commit. Still more left to be done.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9721 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tagcache.h')
-rw-r--r--apps/tagcache.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/apps/tagcache.h b/apps/tagcache.h
index 468c48c..1ac96b4 100644
--- a/apps/tagcache.h
+++ b/apps/tagcache.h
@@ -31,16 +31,38 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title,
#define HAVE_TC_RAMCACHE 1
#endif
-/* Allow a little drift to the filename ordering. */
+/* Allow a little drift to the filename ordering (should not be too high/low). */
#define POS_HISTORY_COUNT 4
+/* How much to pre-load entries while committing to prevent seeking. */
+#define IDX_BUF_DEPTH 64
+
+/* Tag Cache Header version 'TCHxx'. Increment when changing internal structures. */
+#define TAGCACHE_MAGIC 0x54434803
+
+/* How much to allocate extra space for ramcache. */
+#define TAGCACHE_RESERVE 32768
+
/* How many entries we can create in one tag file (for sorting). */
#define TAGFILE_MAX_ENTRIES 20000
+/* How many entries to fetch to the seek table at once while searching. */
#define SEEK_LIST_SIZE 50
+
+/* Always strict align entries for best performance and binary compatability. */
+#define TAGCACHE_STRICT_ALIGN 1
+
#define TAGCACHE_MAX_FILTERS 3
#define TAGCACHE_MAX_CLAUSES 10
+/* Tag database files. */
+#define TAGCACHE_FILE_TEMP ROCKBOX_DIR "/tagcache_tmp.tcd"
+#define TAGCACHE_FILE_MASTER ROCKBOX_DIR "/tagcache_idx.tcd"
+#define TAGCACHE_FILE_INDEX ROCKBOX_DIR "/tagcache_%d.tcd"
+
+/* Flags */
+#define FLAG_DELETED 0x0001
+
enum clause { clause_none, clause_is, clause_gt, clause_gteq, clause_lt,
clause_lteq, clause_contains, clause_begins_with, clause_ends_with };
enum modifiers { clause_mod_none, clause_mod_not };