Listing of MTP directory takes ling time on Galaxy S7 on Ubuntu 17.10
Submitted by Alexxz
Assigned to Philip Langdale
Link to original bug (#792566)
Description
Created attachment 366872 dvfsd debug log
Hi I'm connecting my Galaxy S7 to the Lenovo X250 laptop with Ubuntu 17.10. Basic operations like listing of files and copying single file are working fine. When I'm trying to open my DCIM/Camera directory the listing is taking unbelievable time like 3 minutes for 200 files. I've tried runnig gvfsd in the debug mode and running ls -la under strace.
It shows that call getdents(3, /* 86 entries */, 32768) = 3416 takes ling time to perform. More files I have in directory more time it takes to list values.
1516093040.643645 open("/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C026%5D/Phone/DCIM/Camera/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3 1516093040.643773 fstat(3, {st_mode=S_IFDIR|0700, st_size=0, ...}) = 0 1516093040.643834 getdents(3, /* 86 entries */, 32768) = 3416 1516093224.204684 lstat("/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C026%5D/Phone/DCIM/Camera/.", {st_mode=S_IFDIR|0700, st_size=0, ...}) = 0
adb file syncing performance is fine but I'd like to use more user friendly solutions like gvfs.
Attachment 366872, "dvfsd debug log":
gvfsd.log
Version: 1.34.x