zhanghai / MaterialFiles

Material Design file manager for Android
https://play.google.com/store/apps/details?id=me.zhanghai.android.files
GNU General Public License v3.0
5.44k stars 378 forks source link

Extraction of tar.gz file takes too long #1237

Open shenghuang147 opened 1 month ago

shenghuang147 commented 1 month ago

Device Model: XiaoMi 10 Ultra Android Version: 10 QKQ1.200419.002 MIUI Version: xiaomi.eu 12.0.10 MaterialFiles Version: 1.7.2 (37) Source: F-Droid

I compressed all font files from the Fonts file of Windows 11 21H2 into Fonts.tar.gz , which contains a total of 336 font files

I found that MaterialFiles takes 5 minutes to fully extract this file, while using tar -zxf Fonts.tar.gz in termux only takes 3.3 seconds

.../Fonts $ time tar -zxf ../Download/Fonts.tar.gz

real    0m3.300s
user    0m2.785s
sys     0m0.482s

start: 00:55:40

图片

end: 01:00:37

图片

zhanghai commented 1 month ago

How large is the tar.gz file itself? My suspicion is that the decompression of every single file requires reading the archive from the beginning again. Not sure if this can be optimized easily.

shenghuang147 commented 1 month ago

How large is the tar.gz file itself? My suspicion is that the decompression of every single file requires reading the archive from the beginning again. Not sure if this can be optimized easily.

only 191MB

zhanghai commented 1 month ago

Then it may just be that reason, decompressing roughly 300 * 100 MB = 30 GB of data

Feuerswut commented 5 days ago

Yeah, have this issue as well, depends on library implementation. maybe the extract all specifically should be optimised.