-
-
Notifications
You must be signed in to change notification settings - Fork 497
Description
Describe the bug
On Android 12 running on Samsung Galaxy Note10+ phone it took 14 minutes 5 seconds to find just two .zim files.
Expected behavior
Should take a few seconds. Actually, reading a directory and discovering those files should take 2-3ms, but assuming x1000 application overhead it should still complete in a couple of seconds, no more. Also, allowing one more second for reading and parsing the metadata I would say the maximum allowed time for this is 3 seconds. However, if the .zim file architecture is wrong, i.e. if the file is compressed (the 'z' in the name gives this hint) AND the metadata is stored inside the archive, then it would take about 15 minutes to access 100GB files, which is very bad, because this sort of processing should not depend on the filesize. To test this theory I would have to try with the smaller .zim files.
Steps to reproduce the behavior:
- Copy two zim files to
/Android/media/kiwix. I used WikiPedia English (102GB latest) and WikiPedia Russian (33GB latest). - Go to Android Settings and stop Kiwix app.
- While in the Settings clear cache and data of the Kiwix app
- Start Kiwix app and give it appropriate permissions
- Go to Kiwix and select Settings from the menu
- Point to External in Settings and select
/Android/media/kiwixdirectory (making sure that it does point to External device first) - Give the appropriate permission by clicking on "Use this directory" button
- Go to the Library tab of Kiwix and on another device start the timer
- Observe that the two .zim files will be discovered in 14 minutes and 5 seconds. And this is on a very fast Note10+ smartphone with a very fast 1TB microsd card, so on a lower-end configuration it will take even longer.
Screenshots
Environment
- Version of Kiwix Android : 3.9.1 from https://download.kiwix.org/release/kiwix-android/kiwix-3.9.1.apk
- Device : Samsung Galaxy Note10+
- OS version : Android 12
This problem was also mentioned in #3604