[sword-devel] Mods to VerseKey [was A possible way to speed up was Re: Search optimized (still too slow)]

Lynn Allan sword-devel@crosswire.org
Thu, 8 Apr 2004 13:41:31 -0600


> I'm starting at the bottom up so I'm currently looking at changing
> VerseKey (new class VerseKey2) to support multiple versification
> systems. I'll explain that once I get far enough to do so. But it's
> basically going to be based on the OSIS refsys system[2] and it is going
> to lump all the books together rather than separating into testaments.
> Chris, I see now you've already been doing something on the
> versification stuff[3], how is that going?

Hi Daniel,

While you're looking at possible changes to VerseKey, I would suggest
consideration of a base-class for VerseKey that was only responsible for
"versification". As it is, VerseKey has all kinds of related capabilities
for parsing, search-lists, etc. The net effect is that it becomes an
"octopus of dependencies" with the tendency to draw in a lot of semi-related
code, and makes for a much larger exe size.

Such a class was used as an "experimental plug-in subset" of the sword-api
for LcdBible. It allows dramatically smaller .exe's and, indirectly, much
faster searching. VerseKey can either derive ("is-a") from the proposed
class "CanonVersifier" or contain a CanonVersifier object ("has-a") for
resolving the offsets within the file to fetch a specific verse using
RawVerse or RawText.

Sharing the reason for the season,
http://learningcards.eeworks.org/EeCard01.html
Lynn A
l.allan@att.net