Script afp-ls spends an exorbitant amount of time on collecting file details because files on a volume are first enumerated but then individual file parameters, such as size, permissions, and modification time, are queried one request at a time. In the end, roughly 3*N+1 requests are sent for a volume with N files.
It appears possible to utilize the initial enumeration (which uses FPEnumerateExt2 at the protocol level) to receive all the necessary file details as well, so only one request is needed per volume, even though somewhat larger.
The performance improvement is rather dramatic, typically between 5x to 20x for real-life volumes.
The patch will be committed in a few weeks if no concerns are raised.
Script
afp-lsspends an exorbitant amount of time on collecting file details because files on a volume are first enumerated but then individual file parameters, such as size, permissions, and modification time, are queried one request at a time. In the end, roughly 3*N+1 requests are sent for a volume with N files.It appears possible to utilize the initial enumeration (which uses
FPEnumerateExt2at the protocol level) to receive all the necessary file details as well, so only one request is needed per volume, even though somewhat larger.The performance improvement is rather dramatic, typically between 5x to 20x for real-life volumes.
The patch will be committed in a few weeks if no concerns are raised.