AmazeFileManager
AmazeFileManager copied to clipboard
Implement cache for improved listing performance
Description
Adds a LruCache for local paths, document files, smb / sftp and cloud storages i.e. least recently visited path will be removed. For local paths, adds to cache only if list size is > 100 files. For all other open modes cache is added regardless of list size Lru Cache size is 50 paths for now.
Also builds separate cache for images / videos / music / documents / apks that are accessed from navigation drawer so that we don't spend time loading them again and again.
Issue tracker
Automatic tests
- [ ] Added test cases
Manual tests
- [x] Done
Build tasks success
Successfully running following tasks on local:
- [x]
./gradlew assembledebug
- [x]
./gradlew spotlessCheck
open a folder with a lot of files -> open another folder within -> press back button -> it goes back as expected, but the spinner on SwipeRefreshLayout
doesn't pop up until previous page appears, this feels like an ANR. works fine on release/3.8
.
(folders I used to test were /storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Images/
and /storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Images/Sent
)
Can you show a video. I don't think it's an ANR. That's a default behaviour if list loads too fast we can see the SwipeRefreshLayout appears and disappers immediately
open a folder with a lot of files -> open another folder within -> press back button -> it goes back as expected, but the spinner on
SwipeRefreshLayout
doesn't pop up until previous page appears, this feels like an ANR. works fine onrelease/3.8
.(folders I used to test were
/storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Images/
and/storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Images/Sent
)
Can you show a video. I don't think it's an ANR. That's a default behaviour if list loads too fast we can see the SwipeRefreshLayout appears and disappers immediately
open a folder with a lot of files -> open another folder within -> press back button -> it goes back as expected, but the spinner on
SwipeRefreshLayout
doesn't pop up until previous page appears, this feels like an ANR. works fine onrelease/3.8
. (folders I used to test were/storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Images/
and/storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Images/Sent
)
Never mind! it works perfectly fine now - PFA the recording (: (the first one is v3.7.2
from Play Store & the second one is the current feature/listing-cache
branch)
https://user-images.githubusercontent.com/50027064/184527227-4518a690-cd00-4c65-82b1-b7ee57f8e1ec.mp4