Comments (11)
Oh, OK, so I'd better update the app next week then. I'm going to update Kiwix-JS-Windows vanilla app to 0.9.9 Beta at the same time (I'll post new CHANGELOG shortly). Wikivoyage can probably wait a while (no equations AFAIK!).
It's marginally slower when decompressing one SVG at a time, but on desktop I don't notice it at all, and I hardly notice it on the 950XL. It's well worth the trade-off to be able to support lower-spec models.
from kiwix-js-pwa.
Oh dear. I see the issue is that the page has lots of equations on it, but this version of WikiMed does not have the alt text that enables the app to use MathJax. The problem is that decompressing SVGs is extremely taxing on xzdec.js. It uses a huge amount of memory. This article loads fine on my Lumia 950XL which has 3GB of RAM. I have attempted to fix the SVG problem by limiting the number of SVGs that get sent to the decompressor at a time, and I could try limiting them even more (they're currently sent in batches of 3). That might do the trick on lower-spec devices. But what would really fix the issue would be a fix for openzim/mwoffliner#164 .
from kiwix-js-pwa.
@Jaifroid Yes, was my guess too. My device has 1GB (in total of memory). I would suggest to try to reduce the batches from 3 to 2 and if this is still not enough even only 1 at a time to see if that fix the problem... even if this slow down a bit the loading in more powerful devices.
from kiwix-js-pwa.
Hi @kelson42 , I've compiled an appxbundle of Kiwix JS Windows (not with the packaged WikiMed ZIM) with the svgSliceSize variable set to 2. Could you possibly follow these steps to test on your device?
-
Transfer a copy of
wikipedia_en_medicine_novid_2018-01.zim
to the phone, either with a USB cable, microSD card, or by downloading from the Settings page of Kiwix JS Windows. -
Uninstall Kiwix JS Windows from the device (no need to uninstall Wikivoyage or WikiMed -- we're just going to test with the generic app to avoid huge downloads, as we may need to test a few times with tweaked settings).
-
Download the .appxbundle (only 4MB) in this GitHub directory and note download location:
https://github.com/kiwix/kiwix-js-windows/tree/master/AppPackages/KiwixWebApp_0.9.8.0_Test
For an optimal test, reboot the phone to clear RAM. -
Open File Explorer app, locate .appxbundle, install the package.
-
Open the app, go to Settings and turn off "Remember last visited page" under Privacy settings (to prevent the startup loop in case of a crash).
-
Go back to Home page and search for Hodgkin and Huxley and open page.
Let me know if this allows the page to load correctly. Also, if it still crashes, does it crash before any text is shown, or straight after the page is shown, or after some delay? If not fixed, we can try reducing to one SVG per batch. I'll be testing also on a low-spec device I have.
from kiwix-js-pwa.
On an old Lumia 920 hacked to run Windows 10 Mobile (it has 1GB of memory), I need an svgSliceSize of 1 for this article not to crash. It crashes with 2.
An .appxbundle with svgSliceSize set to 1 is available here for testing:
https://github.com/kiwix/kiwix-js-windows/tree/master/AppPackages/KiwixWebApp_0.9.81.0_Test
from kiwix-js-pwa.
@Jaifroid Thank you for all the effort and testing. If it works for you then I do not think it makes much sense to make to test as my device has also exactly 1Gb of memory. Could you please make directly an update of the Windows store? Or maybe you want to make other fixes?
from kiwix-js-pwa.
I can update the app in the Store, but since updates take 24-48 hours (business days only), if there is an updated ZIM of WikiMed about to come out, it would make sense to wait for it. The last one came out on 5th Jan, so if we're getting a new one on Monday or Tuesday, I might as well include it in the submission.
Even better would be a new WikiMed with the LaTeX/MathJax strings intact.......!
from kiwix-js-pwa.
@Jaifroid Next update of the ZIM file is going to happen in March. By the way: is that really slower to tackle one SVG file at a time (instead of 3)?
from kiwix-js-pwa.
@kelson42 No rush, but when you're able, please confirm that this bug is now squashed on your 1GB device (ensure the app has updated to 0.9.9 first -- it will inform you on first run after update, or check the About page). To hasten the download, go to Microsoft Store -> Hamburger menu -> Downloads and updates, and if necessary tap Get updates. It should be a small update (code only, the ZIM does not get downloaded again).
from kiwix-js-pwa.
@Jaifroid With last Wikimed the app does not crash anymore. But is true it is a bit slow to get all pictures/equations displayed. But it works! :)
from kiwix-js-pwa.
Thanks @kelson42 . Better slow than crashing! The slowness should only affect a page like this with lots of svg equations. Normal png/gif/jpeg pictures should be no problem for the app. With all image types it starts decompressing only the images in the current viewport, and then prefetches up to 20 images further down the page, then stops and waits for the user scrollstop before decompressing more.
Anyway, hopefully SVG equations will be a fallback only if you can get mw-offliner to include the MathJax strings again as alt text. I think that's essential for the maths wikis. It's 1000% faster to typeset with MathJax.
from kiwix-js-pwa.
Related Issues (20)
- DarkReader interferes with loading of CIA World Factbook home page
- Consider adding active content warning for zimit2 archives loaded in the UWP app
- Opening articles in new tabs broken in UWP app HOT 1
- Code that immediately shows the article with new theme applied has become annoying and buggy
- [Release] Kiwix JS PWA Linux/Windows version 3
- When opening a legacy Wikipedia file (e.g. 0.5), the info on how to read it disappears after a few seconds
- Use `skipWaiting()` in the Electron app to ensure immediate update after upgrade install
- Video broken with legacy zimit1 playback method
- When some zimit2 ZIMs are re-opened in PWA on Android, the content of the iframe cannot be interacted with HOT 2
- Unclicking Configuration button or using return to article link broken
- Zimit1 video broken in legacy UWP app
- Edit post-release scripts so they do not run for WikiMed and Wikivoyage
- [Release] WikiMed by Kiwix (Linux/Windows) 3.0.8
- Combination of new architecture and labelling of packaged archives broke Electron auto-update HOT 3
- [Release] Wikivoyage by Kiwix (Linux/Windows) 3.1.4
- Update info about file and directory picking to include File System Access persistent permissions
- In zimit2 ZIMs, when the content specifies opening a link in a new browser window/tab, the main app window blanks out HOT 2
- When using persistent FSA permissions, go straight to article view without showing Config first
- On Windows Mobile (only) the WikiMed legacy UWP app can't locate the included archive HOT 3
- [Release] Kiwix JS PWA Linux/Windows v3.1.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kiwix-js-pwa.