Kiwix-android: [Bug ver 3.4.1]Infinite loading icon in library tab

Created on 16 Oct 2020  路  28Comments  路  Source: kiwix/kiwix-android

Describe the bug
Just an UI bug:Infinite loading icon in library tab
No issue with the library,zims are loaded.

Expected behavior
No more loading icon when zim are loaded.

Steps to reproduce the behavior:

  1. Download zim content
  2. Open library tab

Screenshots
AddText_10-16-06.04.14.jpg

Environment

  • Version of Kiwix Android : 3.4.1
  • Device : Huawei P10
  • OS version : Android 9
stale

Most helpful comment

https://github.com/kiwix/kiwix-android/issues/2405 there is a solution outlined here

All 28 comments

Thank you for the report, will investigate and hopefully have a fix in not too long

@Mitia99 I'm sorry but I can't reproduce the issue, I tried ~5 times the procedure mentioned in the description but couldn't find it. Can you please answer one question: Does it always occur(via following the steps given in the issue desc.) or you just caught it once?

@s-ayush2903
I tried force stop and clear cache but same issue.

Video showing the issue
https://drive.google.com/file/d/1XKecR3z52jRgwCntXWLmA9xBakZZHoVB/view?usp=drivesdk

@s-ayush2903
It always occurs.

Additionnal information:
I did an update from version 3.3.1(i.e I downloaded the zim contents with 3.3.1).

No worries, I'll take a look

@s-ayush2903
I tried to clear app data(which removed all zim contents) but same issue.So I don't think it that the issue is linked with the updateScreenshot_20201021_061917.jpg

Ahhh this is library, not Download, d'oh. So what this is doing is scanning your filesystem looking for zims. I am going to assume you are using an sd card? There is a possibility this is blocked by our file system detection, in Download do you see large entries ie >4GB, greyed out?

@macgills I'm using a 64go SD Card.Storage is set on internal
Screenshot_20201021_114225_org.kiwix.kiwixmobile.jpg

hmmmm so it is potentially an error in StorageObserver. Have you left the phone on this screen for an unreasonably long time? I wonder if it ever completes

I'm encountering this problem too.

Would you like for this to be assigned to you then @gouri-panda ? The file search completes near instantaneously on my device

+1 To second line in the trailing comment, I still can't reproduce the issue

Would you like for this to be assigned to you then @gouri-panda ? The file search completes near instantaneously on my device

yes @macgills

@Mitia99 I'm facing this problem but in a different way. On my phone, it loads for approximately 3-4 minutes. Do you have this situation too?

@gouri-panda Yes same here,I figured out that it is taking ~ 2minutes but when I reduce kiwix app/switch to an other tab(e.g:download) and re-open kiwix/library tab,it is re-scanning very slowly.

That's because it is downloading the content even if you switched the tab, that's why it is taking so much time.

@gouri-panda Oh,I see..I hope that you could improve the scan time.

@Mitia99 it's taking the usual time ,but if you have slow processor than you can feel the delay like I have. My one phone is taking 2 to 3 minutes and the other phone is taking hardly 10 sec.

@gouri-panda I don't think that it is a processor issue.I am using a kirin 960(8 core cpu) which is pretty fast even in huge apps.Maybe,It will be better to limit the engine scan with only specific files/path(not the whole storage).

@Mitia99 I looked over your storage.My hypothesis is that you have a lot of content in both your internal and external memory card so thats why it scans the whole thing after you dowload zim files.

@gouri-panda Yes,you're right.That's why making the engine to only scan specific folders/files types will be great.For users with large files in 128go/256go memory/SD Card it will take a very long time.

@Mitia99 It will break us our certain feature like sharing our Zim files and download the Zim files over the internet. It won't add these files into library.

https://github.com/kiwix/kiwix-android/issues/2405 there is a solution outlined here

@macgills Thank you for the reference.Personnaly,I don't really want a manual folder selection but only an improved auto-scan(modify a bit the way that the engine scans).

It is quite difficult to "intelligently" scan as any number of apps eg torrent clients, browsers, dedicated downloaders, could be downloading files and be putting them anywhere on disk as could a user transferring manually. Our only guarantee is to look everywhere and really it shouldn't be that slow but here we are.
We have 2 options as I see it and we could do both of them.

  1. coroutines rewrite to try and improve performance
  2. a switch to deactivate full scanning and only look at Kiwix app folders

long term we could look at user configurable search locations but sooner or later we are going to have to start supporting the SAF which is going to change file access quite a lot and there is a lot of work that will go into UI/UX of that feature (unless we just give users a textbox and let them add any path they want but I imagine that being confusing and unfriendly) and that might get trashed, wasting dev time.

@macgills Option 1 sounds good. Should I start working on this ticket?

make a sub ticket for a coroutines rewrite would be best I think

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings