When you try list a directory containing thousands of files (such as CAMERA), simple-mtpfs would do a fuse LOOKUP on every single file contained in that directory, resulting in a noticable delay. What's more, the result is not cached, so time you list that directory again directory it'll cause the delay.
Have you considered implementing a NFS-like READDIRPLUS, which combines the functionality of the READDIR and LOOKUP operations? To see the difference in speed, compare simple-mtpfs with go-mtpfs (which relies on go-fuse), where even large directories hardly take longer than 1s to list.
Hello,
When you try list a directory containing thousands of files (such as CAMERA), simple-mtpfs would do a fuse LOOKUP on every single file contained in that directory, resulting in a noticable delay. What's more, the result is not cached, so time you list that directory again directory it'll cause the delay.
Have you considered implementing a NFS-like READDIRPLUS, which combines the functionality of the READDIR and LOOKUP operations? To see the difference in speed, compare simple-mtpfs with go-mtpfs (which relies on go-fuse), where even large directories hardly take longer than 1s to list.
Cheers!