On Tue, Sep 27, 2011 at 1:51 PM, Christian Pühringer <cip@gmx.at> wrote:
I've pushed the code to https://github.com/cip/zimgap-android.
Note that the only functionality is currently to load an article from the zim
file and display it.
In particular there is no search functionality, so  you have to know the exact
article name to open it.
The reason is simply that I am currently focusing on the feasibility, and I
expect that the main issues are related to loading
an article and and not related to searching the index.

Just to warn: run 'git submodule init && git submodule update' after cloning the repository, or Eclipse will whinge about being unable to find the xz-java sources. :)

I did a quick test on my Nexus One (running Android 2.3.6, so with JIT). There are some faster processors out there on higher-end phones, but there's also a lot of cheaper phones that aren't going to be any faster than this.

The wikipedia-de.zim test file hasn't downloaded here yet so I started with a smaller file generated from: http://en.wikipedia.org/wiki/User:Brion_VIBBER/Books/SmallZimTest

Fastest of three runs each:

'Barack Obama' (a fairly long article with a few hundred KB of HTML)
Load time 5298ms
Render time 439ms

'Husiatyn Raion' (a shorter article)
Load time 1789ms
Render time 23ms

Better than 20 seconds, but still pretty slow; I'm not sure offhand how the articles get placed in their blocks so there may well be worse worst cases. :(

Definitely worth trying the native-code library at least for the LZMA -- though in a worst case, a few seconds to load isn't worse than you'll have on a slow mobile data network. :) Make sure it runs on a background thread and shows a spinner or progress bar if we do end up having to run fetches this slowly on some platforms...

-- brion