-
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Libzim experiments #766
Libzim experiments #766
Conversation
I just added the MIME-type handling |
It's clearly not optimal but it's a start. |
I have played a bit with this proof-of-concept. First of all, congratulations -- it's a great achievement to have been able to compile libzim with Emscripten and to have overcome the obstacles with stability and the amount of data returned. While it does "seem" slower than our current implementation, it is not unacceptably slow (at least on a modern PC), and more work can be done to find out where the bottlenecks are. It looks like there could be some positive news coming in the not-too-distant future on #513, and that could well provide faster file access. This is looking very positive! (Note to self: link to code for compiling libzim: https://github.com/mossroy/libzim_wasm) |
I've rebased this branch, and updated the wasm of libzim, which now allows to use any size of ZIM file, and is based on libzim 7.2.2 |
4454649
to
437aa8f
Compare
Rebased on master |
Out of curiosity as to whether the libzim port might improve #581, I tried the prototype on an Android phone (with latest Chromium browser). At the moment it does not seem able to do an article count, a search or display an article. I tried with a small Ray Charles and also with two large ZIMs (>4GB). It doesn't seem to be the 4GB issue, as the Ray Charles didn't work either. I didn't connect a debugger to the phone, so I'm not sure what the issue is, but thought I'd document this for further investigation. |
437aa8f
to
1a0baa4
Compare
Rebased this branch/PR on master. |
93be57c
to
43688f6
Compare
43688f6
to
ed56c76
Compare
Interestingly, I'm getting the same scroll-lock issue when using libzim to read a ZIM with a graphical front page as reported in kiwix/kiwix-js-pwa#475. It affects this branch in SW mode, but also jQuery mode (which does not use the libzim WASM). |
ed56c76
to
4a12c5b
Compare
3f48f0c
to
d84d0cb
Compare
70d64bc
to
d0d037a
Compare
@Rishabhg71 I've force-pushed this PR in order to get rid of the distracting spacing and layout differences, and also to revert the libzim versions to the same that are in main, so you'll need to reset your local copy to origin. You'll see that, because we already have code to load the libzim WASM for full-text search, actually this PR is very simple, only a few lines intervening in the message channel. For now, I think all you need to do is to make the logic conditional, based on the dropdown you're adding, so that users and developers can easily switch between current implementation and trying out the different libzim versions. This will require some logic in zimArchive.js, where libzim is currently loaded. You can see the implementation in the PWA, which lets users choose between DEV / ASM / WASM versions of libzim (for the purposes of search, but the loading logic is the same even though your purpose will be to allow reading the contents of a ZIM with the chosen libzim version (as well as search). |
8317261
to
84eaa5c
Compare
Force-pushed again after rebase on main (with javascript-libzim v0.5). |
4146421
to
72d0911
Compare
Branch is now superseded by #1160. |
It uses the libzim only for getting content (articles and assets), but without setting the MIME type for now (because the C code does send this information for now)
For each content requested, it first resolves redirections without libzim (because it's not implemented in our C code either)
All the search features are without libzim for now
Error handling is bad when using libzim