With the current implementation, doing "ls -l" on a large directory over a slow link takes a long time. To be precise, it takes about 4*numfiles*RTT seconds, because for every file, a LOOKUP and a GETATTR has to be done. This could be eliminated by having unfsd support the READDIRPLUS operation. I've found a comment in the unfsd source code that says this is not possible, though, due to some atomicity requirement. This needs some investigation.
Pascal says that the comment is outdated, and that it actually would be possible to implement READDIRPLUS.
Not a bug; retargeting.
Created attachment 253 [details] Hacky patch The attached patch is a start of support of READDIRPLUS in unfs3. I worked on this during the summer; the patch is by no means ready, but I'm attaching it here to make sure it's not lost.
Another idea of improving performance: it seems like Windows is trying to open a lot of "strange files", I believe resource forks. Perhaps we should consider filtering out these... open_weak:/tmp/.webmin:{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:$DATA| open_weak:/tmp/.webmin:SummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_SummaryInformation:$DATA| open_weak:/tmp/.webmin:SummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_SummaryInformation:$DATA| open_weak:/tmp/.webmin:SummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_SummaryInformation:$DATA| open_weak:/tmp/.webmin:SummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_SummaryInformation:$DATA| open_weak:/tmp/.webmin:SummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_SummaryInformation:$DATA| open_weak:/tmp/.webmin:SummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_SummaryInformation:$DATA| open_weak:/tmp/.webmin:SummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_SummaryInformation:$DATA| open_weak:/tmp/.webmin:DocumentSummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_DocumentSummaryInformation:$DATA| open_weak:/tmp/.webmin:DocumentSummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_DocumentSummaryInformation:$DATA| open_weak:/tmp/.webmin:SummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_SummaryInformation:$DATA| open_weak:/tmp/.webmin:SummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_SummaryInformation:$DATA| open_weak:/tmp/.webmin:SummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_SummaryInformation:$DATA| open_weak:/tmp/.webmin:SummaryInformation:$DATA| open_weak:/tmp/.webmin:Docf_SummaryInformation:$DATA| open_weak:/tmp/.webmin:SebiesnrMkudrfcoIaamtykdDa:$DATA| open_weak:/tmp/.webmin:Docf_SebiesnrMkudrfcoIaamtykdDa:$DATA| open_weak:/tmp/.webmin:SebiesnrMkudrfcoIaamtykdDa:$DATA| open_weak:/tmp/.webmin:Docf_SebiesnrMkudrfcoIaamtykdDa:$DATA| open_weak:/tmp/.webmin:OzngklrtOwudrp0bAayojd1qWh:$DATA| open_weak:/tmp/.webmin:Docf_OzngklrtOwudrp0bAayojd1qWh:$DATA| open_weak:/tmp/.webmin:OzngklrtOwudrp0bAayojd1qWh:$DATA| open_weak:/tmp/.webmin:Docf_OzngklrtOwudrp0bAayojd1qWh:$DATA| open_weak:/tmp/.webmin:OzngklrtOwudrp0bAayojd1qWh:$DATA| open_weak:/tmp/.webmin:Docf_OzngklrtOwudrp0bAayojd1qWh:$DATA| open_weak:/tmp/.webmin:OzngklrtOwudrp0bAayojd1qWh:$DATA| open_weak:/tmp/.webmin:Docf_OzngklrtOwudrp0bAayojd1qWh:$DATA| open_weak:/tmp/.webmin:OzngklrtOwudrp0bAayojd1qWh:$DATA| open_weak:/tmp/.webmin:Docf_OzngklrtOwudrp0bAayojd1qWh:$DATA| open_weak:/tmp/.webmin:OzngklrtOwudrp0bAayojd1qWh:$DATA|
As a real-world example, doing "ls" in a directory with 10k files, with the client and server on the same network, takes two and a half minutes.