Open suraj3486 opened 3 years ago
Can I have some more info about the size of your sticker directory and how long it takes? What woosticker does on import is create a local copy of the data in it's internal folder (this gets rid of annoying permissions issues as well as the effects of unintended changes to the sticker state). Unfortunately this means that the speed of how fast stickers are imported is directly related to how fast your phone can copy files. Maybe this can be sped up by using more threads to do the copy (assuming the storage isn't the bottleneck)-- I'll see what I can do once I have some more time.
Also, what android version are you on? Android 11 apparently screwed up some filesystem things.... https://old.reddit.com/r/androiddev/comments/kpn68k/android_11_very_slow_file_access_performance/
I m on custom rom of A11. As it makes its own data folder which means it is eating extra storage. I have around 1G.B stickers which means i have to give 1G.B more as i have to use this app? Please make it use only original stickers like uSticker which were not making any copy in data folder
Willing to look into this but I'd also like some feedback on what edge cases should look like. Especially in terms of moving/deleting files, see the below link for an example of why using external storage can complicate things:
Additionally, using external storage would mean that I would have to use DocumentFile exclusively (which is apparently much slower than File). Right now what I think is happening is that there is a large 1 time cost to copy from external storage (using DocumentFile) but that gets amortized across subsequent uses of woosticker (which uses the faster File class) Changing the design would make it so there isn't a 1-time cost anymore, but regular usage may suggest (since the stickers need to be accessed using DocumentFile).
So ultimately I'd like to figure out a few things before I try sometime out (which also might take a while because this is a side project and I have other stuff going on right now):
Just put a warning that ( if u ever update these sticker folders than refesh it through app first than use it ) that is how earlier uSticker were working
That doesn't fully address my concerns above-- notably, is a warning enough to explain to the user that a file they moved out of the stickers directory still exists in the stickerpack? Do people really want to give permanent file access to a tiny sticker keyboard? And, perhaps most importantly, would this even help performance issues given that everything would need to move to the pitifully slow SAF?
Than how about a refresh button in keyboard top bar. Which will recheck all its files from sources and gets modified on the spot
Willing to look into this but I'd also like some feedback on what edge cases should look like. Especially in terms of moving/deleting files, see the below link for an example of why using external storage can complicate things:
Additionally, using external storage would mean that I would have to use DocumentFile exclusively (which is apparently much slower than File). Right now what I think is happening is that there is a large 1 time cost to copy from external storage (using DocumentFile) but that gets amortized across subsequent uses of woosticker (which uses the faster File class) Changing the design would make it so there isn't a 1-time cost anymore, but regular usage may suggest (since the stickers need to be accessed using DocumentFile).
So ultimately I'd like to figure out a few things before I try sometime out (which also might take a while because this is a side project and I have other stuff going on right now):
- How does UX work? Should the user still manually import stickers?
- How does file deletion work? If a user deletes an image in an external directory, how does woosticker explain to the user that the sticker no longer exists?
- Similarly, if a sticker gets moved from one folder to another, should it also get moved to a different "pack"? Or should it stay in it's original pack until it gets re-imported.
- This means that woosticker would need persistent permissions to every file associated with the selected directory, as opposed to a one-time access to copy those files. Are people okay with allowing for basically permanent file access by woosticker?
I believe this should be addressed by:
It takes very long time to load a folder containing sub folders