[sword-devel] Re: [sword-devel]Squeak Sword UI

Patrick Narkinsky sword-devel@crosswire.org
Thu, 16 Jan 2003 12:03:47 -0500


Thus spake "Chris Little"> :

> Like I proposed that we might do for Sword, he could consider building
> indexes into the OSIS XML files.  It would be relatively simple to build
> an index that catalogues the start and end point of each identified
> osisID, for example.  This would mean you only had to read from the OSIS
> file that portion you wanted to display.  (This is a very simplified case
> I realize.)

Why not cache the indexes rather than build them into the modules?  That is,
when you add an OSIS module to the program (be it sword-based or whatever)
you add an index for the file to your internal database (based, e.g. on
sqlite). This would have a number of advantaes:

1) It would be simple (from a programming perspective) to find a verse in
multiple translations.
2) It would be blazingly fast to search. (sqlite is very, very fast.)
3) It would preserve a one-file download with a simple, XML-based format
(OSIS)

What you would do would be, the first time the module was opened, go through
and create the index. On modern hardware, this need not take a terribly long
time.  This could be done in a background thread fairly easily.

Patrick

--
Patrick Narkinsky - Apprentice Pastor, Hope Community Church

"I would rather feel contrition than know how to define it."

- Thomas a Kempis