Hi Troy,<div><br></div><div>Below you suggest</div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>The really interesting thing is that for the first time, Android might</div>
<div>be a real opportunity to use both implementations for different purposes</div><div>in the same application.</div><div><br></div></blockquote><div>I had not considered that architecture but I would be interested to hear your thoughts if you have considered this in any more detail.</div>
<div><br></div><div>Thanks</div><div>Martin</div><div><br><div class="gmail_quote">On 28 October 2010 12:52, Troy A. Griffitts <span dir="ltr"><<a href="mailto:scribe@crosswire.org">scribe@crosswire.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hey Martin,<br>
<br>
You probably know this, but the difference between JSword and the SWORD<br>
C++ engine is obviously that the C++ engine is written in C++ and JSword<br>
is an alternate engine written in Java.<br>
<br>
Bishop uses the Java jni bindings to the C++ engine. In fact bishop is<br>
simply a test harness for the bindings right now. I wouldn't consider<br>
it even close to a public frontend.<br>
<br>
Both JSword and the SWORD C++ engine work against the same installed set<br>
of books, so you should be able to use either or both in your frontend.<br>
<br>
The C++ Engine will require about a 700K native bundle in your app and<br>
the Java classes to use it are located in SVN here:<br>
<br>
<a href="http://crosswire.org/svn/sword/trunk/bindings/java-jni/src/org/crosswire/android/sword/" target="_blank">http://crosswire.org/svn/sword/trunk/bindings/java-jni/src/org/crosswire/android/sword/</a><br>
<br>
(you can simply grab the binary blob out of the bishop.apk I posted if<br>
you don't want to learn how to use the NDK to compile it yourself. In<br>
fact I think the total size of the bishop.apk is mostly just the 700k<br>
for the binary blob).<br>
<br>
The really interesting thing is that for the first time, Android might<br>
be a real opportunity to use both implementations for different purposes<br>
in the same application.<br>
<br>
Anyway, I don't think the bishop source will be particularly interesting<br>
to you. The 3 Java classes at the SVN link above are a fairly<br>
straightforward interface to the engine. But still, if you'd like to<br>
see it, I've been periodically posting the sources from my public home<br>
on CrossWire. Here is the latest bundle:<br>
<br>
<a href="http://crosswire.org/~scribe/bishop-20101026.tar.gz" target="_blank">http://crosswire.org/~scribe/bishop-20101026.tar.gz</a><br>
<br>
<br>
Hope this is helpful.<br>
<br>
Troy<br>
<div class="im"><br>
<br>
<br>
<br>
On 10/27/2010 09:07 PM, Martin Denham wrote:<br>
> Hi Troy,<br>
><br>
> I didn't realise unindexed searches could be done so quickly. Can you<br>
> point me to the relevant source for the unindexed search and Bishop (I<br>
> don't know my way around the Crosswire svn repository).<br>
><br>
> Kind regards<br>
> Martin<br>
><br>
> On 27 October 2010 20:34, Troy A. Griffitts <<a href="mailto:scribe@crosswire.org">scribe@crosswire.org</a><br>
</div><div class="im">> <mailto:<a href="mailto:scribe@crosswire.org">scribe@crosswire.org</a>>> wrote:<br>
><br>
> Thanks Brian,<br>
><br>
> I am currently of the persuasion that indexed searching is not the<br>
> way to go on Android. 4 seconds is quite an acceptable speed to wait<br>
> for a search and no index creation time or versioning headaches.<br>
> Searches can also be more easily customised. For example, full text<br>
> searches (i.e. unindexed searches) in the engine currently support<br>
> regex and searching on any entryAttribute created by any filter.<br>
><br>
> There are benefits to indexed searching of course, especially when<br>
> dealing with searches across a large library of books, but for a<br>
> simple handheld reader of just a few books, I'm still leaning toward<br>
> favoring unindexed if the results can be returned in under 7 seconds.<br>
><br>
> But we support both so it is a matter of use case and preference really.<br>
><br>
> For example, in my personal study, I typically only search a single<br>
> Greek text or English text. I very seldom search a commentary or<br>
> lexicon. So I might decide to index my 2 frequently searched<br>
> modules and be willing to wait 10 seconds to brute force search any<br>
> of my other 200 modules and not have them indexed. In reality, on<br>
> my laptop the speeds to brute force are nearly instant anyway.<br>
><br>
> Thanks for the numbers. Any thoughts?<br>
><br>
> Troy<br>
><br>
><br>
><br>
><br>
> "Brian J. Dumont" <<a href="mailto:bdumont@ameritech.net">bdumont@ameritech.net</a><br>
</div><div><div></div><div class="h5">> <mailto:<a href="mailto:bdumont@ameritech.net">bdumont@ameritech.net</a>>> wrote:<br>
><br>
> >Troy,<br>
> ><br>
> >Search times for an HTC Evo running standard HTC-version of Android<br>
> 2.2:<br>
> ><br>
> >God love world: 4.576s<br>
> >God: 12.111s<br>
> ><br>
> >As a side note, if we're looking for speed it seems like it would make<br>
> >the most sense to focus on indexed searches. "And-Bible", which uses<br>
> >Java but indexed searches, seems to get roughly:<br>
> ><br>
> >God love world: 1s<br>
> >God: 7s<br>
> ><br>
> >Thanks for your work!<br>
> >Brian<br>
> ><br>
> ><br>
> ><br>
> >On 10/26/2010 07:43 PM, Troy A. Griffitts wrote:<br>
> >> OK, a couple things. Changed result list logic from using<br>
> String+= to<br>
> >> using StringBuffer.append and cut out the time delay between the<br>
> end of<br>
> >> the search and the display of the large result set.<br>
> >><br>
> >> I also have some numbers from my old G1 running Cyanogen 1.6<br>
> (Android 2.2+).<br>
> >><br>
> >> Today's build:<br>
> >><br>
> >> <a href="http://crosswire.org/~scribe/bishop-20101026.apk" target="_blank">http://crosswire.org/~scribe/bishop-20101026.apk</a><br>
> >><br>
> >><br>
> >><br>
> >> KJV "God love world" (6 results)<br>
> >><br>
> >> 4.722 seconds G2 stock Android 2.2<br>
> >> 19.485 seconds G1 Cyanogen 1.6 / Android 2.2<br>
> >><br>
> >><br>
> >><br>
> >> KJV "God" (3578 results)<br>
> >><br>
> >> 13.966 seconds G2 stock Android 2.2<br>
> >> 52.535 seconds G1 Cyanogen 1.6 / Android 2.2<br>
> >><br>
> >><br>
> >> _______________________________________________<br>
> >> sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
</div></div>> <mailto:<a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>><br>
<div class="im">> >> <a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
> >> Instructions to unsubscribe/change your settings at above page<br>
> >><br>
> >><br>
> ><br>
> ><br>
> >_______________________________________________<br>
> >sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
</div>> <mailto:<a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>><br>
<div class="im">> ><a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
> >Instructions to unsubscribe/change your settings at above page<br>
><br>
> --<br>
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.<br>
><br>
> _______________________________________________<br>
> mobile-devel mailing list<br>
</div>> <a href="mailto:mobile-devel@crosswire.org">mobile-devel@crosswire.org</a> <mailto:<a href="mailto:mobile-devel@crosswire.org">mobile-devel@crosswire.org</a>><br>
<div><div></div><div class="h5">> <a href="http://www.crosswire.org/mailman/listinfo/mobile-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/mobile-devel</a><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> mobile-devel mailing list<br>
> <a href="mailto:mobile-devel@crosswire.org">mobile-devel@crosswire.org</a><br>
> <a href="http://www.crosswire.org/mailman/listinfo/mobile-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/mobile-devel</a><br>
<br>
<br>
_______________________________________________<br>
mobile-devel mailing list<br>
<a href="mailto:mobile-devel@crosswire.org">mobile-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/mobile-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/mobile-devel</a><br>
</div></div></blockquote></div><br></div>