mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[PR #101] [MERGED] Optimized function "bool directory_empty()" #1344
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#1344
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/101
Author: @adobos
Created: 12/24/2014
Status: ✅ Merged
Merged: 1/13/2015
Merged by: @ggtakec
Base:
master← Head:directory_empty_optimization📝 Commits (1)
69ef7fbOptimized function directory_empty: check for at most one entry when evaluating whether a directory is empty or not (as opposed to doing full directory listing)📊 Changes
1 file changed (+11 additions, -4 deletions)
View changed files
📝
src/s3fs.cpp(+11 -4)📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.