[bt-devel] caching

Joachim Ansorg bt-devel@crosswire.org
Wed, 10 Oct 2001 18:28:39 +0200


Hi!

> Hi
>
> I added a disk caching mechanism for lexicon entries. This is a significant
> speedup for opening larger modules such as BDB or WebstersDict.

Cool!

> At the moment the files are written to /tmp. Can somebody tell me how to
> obtain the user's kde dir (e.g. /home/user/.kde2/share/apps/bibletime/ )?

An example for this is in CProfileMgr.

	KStandardDirs stdDirs;
	m_profilePath = stdDirs.saveLocation("data", "bibletime/profiles/");	

m_profilePath contains now the path to the desired path. The directory is 
created if it does not exist already.

> The files will reside there in future and be called bt-cache-$MODULENAME.
> They store version info too.
> Just an example:
>
> -rw-r--r--    1 Martin   users      123956 Okt 10 14:01 bt-cache-BDB
> (some 8,000 entries in BDB)
> -rw-r--r--    1 Martin   users     2144138 Okt 10 14:57
> bt-cache-WebstersDict (some 90,000 entries in WebstersDict)
>
> I estimate that lexicon opening time is reduced by 60% to 70%. The
> disadvantage is that it comsumes disk space.

Why not use a config option for this?

> Martin

Joachim