-
-
Notifications
You must be signed in to change notification settings - Fork 459
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
Improved the scanning of ZIM files. #3674
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3674 +/- ##
============================================
+ Coverage 48.54% 48.69% +0.15%
- Complexity 1089 1090 +1
============================================
Files 285 285
Lines 10591 10622 +31
Branches 1422 1429 +7
============================================
+ Hits 5141 5172 +31
+ Misses 4606 4603 -3
- Partials 844 847 +3 ☔ View full report in Codecov by Sentry. |
@gouri-panda Any chance you can review this PR? |
@kelson42 When the user attempts to refresh the list then the scan will work.
@kelson42 We have implemented the progress bar as we have in the reader screen when loading the article. I think in the video progress bar does not look proper due to the small height. Let me increase the height of the progress bar so that it will look proper in the UI, and the user clearly see it. |
608c97f
to
6ad6e6f
Compare
I have changed the UI to show the progress properly and updated the video on the PR description. |
@MohitMaliFtechiz So you need to swap down in the local library to request a new scan. This is the only way to request a new scan. When a new scan happen then what happen exactly. Can you please provide a screencast because this is unclear to me. |
@kelson42 Yes, this is the proper and easy way to refresh any data, When a new scan is triggered then a horizontal progress bar starts between the ZIM files list and the RefreshData.mp4 |
@gouri-panda Can you please review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a user POV LGTM.
@kelson42 Sure :) Give me some time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kelson42 Both the UI and code looks good! @MohitMaliDeveloper Thanks :)
* Excluding the "data," "obb," and "Trash" folders from scanning is justified for several reasons. The "Trash" folder contains deleted files, making it unnecessary for scanning. Additionally, the "data" and "obb" folders are specifically designed for the app's private directory, and users usually do not store ZIM files there. Most file managers prohibit direct copying of files into these directories. Therefore, scanning these folders is not essential. Moreover, such scans consume time, given the presence of numerous files written by other apps, which are irrelevant to our application.
…yFragment`. * Now, scanning the storage only occurs when the user explicitly requests it. When the user attempts to refresh the list, the storage is scanned to identify ZIM files. This approach prevents unnecessary scanning when users frequently navigate to other screens.
* We have enhanced our scanning process to provide real-time progress updates, allowing users to track how much time is required to complete the operation.
…lTest` test that are failing after this change.
Fixes #3646
Excluding the "data," "obb," and "Trash" folders from scanning is justified for several reasons. The "Trash" folder contains deleted files, making it unnecessary for scanning. Additionally, the "data" and "obb" folders are specifically designed for the app's private directory, and users usually do not store ZIM files there. Most file managers prohibit direct copying of files into these directories. Therefore, scanning these folders is not essential. Moreover, such scans consume time, given the presence of numerous files written by other apps, which are irrelevant to our application.
Without this fix
Which takes
2.3
Seconds to scan for the ZIM files.After place fix
It takes
1.6
seconds to scan the storage for the same ZIM files. However, in obb, and the data folder has only a few files but still reduces the.7
secondNow, scanning the storage only occurs when the user explicitly requests it. When the user attempts to refresh the list, the storage is scanned to identify ZIM files. This approach prevents unnecessary scanning when users frequently navigate to other screens.
We have enhanced our scanning process to provide real-time progress updates, allowing users to track how much storage has been scanned.
XRecorder_26012024_163432.mp4
XRecorder_26012024_163518.mp4