aboutsummaryrefslogtreecommitdiffstats
path: root/libibex/wordindex.h
diff options
context:
space:
mode:
authorNot Zed <NotZed@HelixCode.com>2000-11-16 20:33:15 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-11-16 20:33:15 +0800
commitbe8b8b1cea99ef242c42b751c271c579b53ae2e5 (patch)
treee5b53b0741ea1ab693d10f2a859982d87fc14c6b /libibex/wordindex.h
parentd39149c5797d79e902621585554985132c1e445d (diff)
downloadgsoc2013-evolution-be8b8b1cea99ef242c42b751c271c579b53ae2e5.tar
gsoc2013-evolution-be8b8b1cea99ef242c42b751c271c579b53ae2e5.tar.gz
gsoc2013-evolution-be8b8b1cea99ef242c42b751c271c579b53ae2e5.tar.bz2
gsoc2013-evolution-be8b8b1cea99ef242c42b751c271c579b53ae2e5.tar.lz
gsoc2013-evolution-be8b8b1cea99ef242c42b751c271c579b53ae2e5.tar.xz
gsoc2013-evolution-be8b8b1cea99ef242c42b751c271c579b53ae2e5.tar.zst
gsoc2013-evolution-be8b8b1cea99ef242c42b751c271c579b53ae2e5.zip
Initialise nameinit & namecache. (contains_name): On first call, load all
2000-11-16 Not Zed <NotZed@HelixCode.com> * wordindexmem.c (ibex_create_word_index_mem): Initialise nameinit & namecache. (contains_name): On first call, load all names into memory. We usually do a whole lot of lookups in a row, and this saves a lot of penalties on a big list, for not too much a memory hit. (find_name): If we have the namelist in memory do a quick short-circuit check to see if we have to do further processing. (unindex_name): Cross check the namecache, if it is active. Remove it there too/or exit (no work to do). (word_flush): If we have the namecache active, destroy it now, as it is not needed anymore (for now). svn path=/trunk/; revision=6591
Diffstat (limited to 'libibex/wordindex.h')
-rw-r--r--libibex/wordindex.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libibex/wordindex.h b/libibex/wordindex.h
index 353f4dddc6..3a60accb70 100644
--- a/libibex/wordindex.h
+++ b/libibex/wordindex.h
@@ -61,6 +61,8 @@ struct _IBEXWord {
struct _list wordnodes; /* LRU list of wordcache structures */
int wordcount; /* how much space used in cache */
int precount;
+ GHashTable *namecache; /* a list of names (only), cached for quick reference */
+ int nameinit;
};