s3fs-fuse/s3fs-fuse — pull request #101 by adobos (2014-12-24 06:45:43+00:00)
Title: Optimized function "bool directory_empty()"

Function "bool directory_empty()" downloads full directory listing to find out whether the directory is empty or not. This requires both a larger download from S3, and possibly multiple round trips to S3 (S3 API returns at most 1,000 entries per call). For directories with many thousands of entries, this comes with a significant performance penalty.

The modified version of the function checks for at most one entry to make a decision whether the directory is empty or not.