Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>My advise would be to use something else than XML. Note that I <em>don't</em> have anything against XML in general; just want make that clear, since there are quite a few people out there who feel XML is not good for <em>anything at all</em>. </p> <p>Here are some of the anticipated consequences of using XML in this case:</p> <p><strong>Lookup times</strong></p> <p>It would make jumping to specific positions in your text <em>always</em> expensive. XML would offer you two ways to do it: </p> <ol> <li>Read the entire document in a streaming way until you hit the fragment that you were looking for. Very slow.</li> <li>Read the entire document into an in-memory data structure, which would allow you to create an in memory index from some sort of location identifier to the actual text fragment. Very expensive in terms of memory consumption.</li> </ol> <p><strong>Compactness</strong></p> <p>Turning the entire bible into an XML file would make it <em>HUGE</em>. Of course there solutions such as <a href="http://en.wikipedia.org/wiki/Fast_Infoset" rel="nofollow">Fast Infoset</a> and <a href="http://www.w3.org/XML/EXI/" rel="nofollow">Efficient XML</a> (both binary encodings of <a href="http://www.w3.org/TR/xml-infoset/" rel="nofollow">Infoset</a>, the data model behind XML). That would help a little, but perhaps not a lot. Gzip would probably reduce to approx. 1/3 of the original size, which again would help, but it would still be big.</p> <p><strong>What to do instead?</strong></p> <p>My advise would be to consider a binary encoding of your bible text; one that is optimized for fast lookups. Like, having an index <em>inside</em> the file, mapping the location (a verse) to the offset where that actual text fragment starts. And if you do it properly, there is even the bonus of having something that is way more compact than XML.</p> <p><strong>Harder?</strong></p> <p>It sounds much harder, but in reality, it might not. You might also consider looking at <a href="http://preon.github.com/" rel="nofollow">Preon</a>, since Preon has been used on Android as well, and allows you to declaratively map an in memory data structure into its binary encoded representation. The framework <em>itself</em> will figure out if there is an opportunity to load data lazily, from the input file.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload