{"action":"created","issue":{"url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/158","repository_url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse","labels_url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/158/comments","events_url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/158/events","html_url":"https://github.com/s3fs-fuse/s3fs-fuse/issues/158","id":63783088,"number":158,"title":"Slow and/or no response when listing long directories","user":{"login":"darrencruse","id":1283688,"avatar_url":"https://avatars.githubusercontent.com/u/1283688?v=3","gravatar_id":"","url":"https://api.github.com/users/darrencruse","html_url":"https://github.com/darrencruse","followers_url":"https://api.github.com/users/darrencruse/followers","following_url":"https://api.github.com/users/darrencruse/following{/other_user}","gists_url":"https://api.github.com/users/darrencruse/gists{/gist_id}","starred_url":"https://api.github.com/users/darrencruse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darrencruse/subscriptions","organizations_url":"https://api.github.com/users/darrencruse/orgs","repos_url":"https://api.github.com/users/darrencruse/repos","events_url":"https://api.github.com/users/darrencruse/events{/privacy}","received_events_url":"https://api.github.com/users/darrencruse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-03-23T17:27:44Z","updated_at":"2016-02-16T09:28:55Z","closed_at":null,"body":"Searched the issues didn't find anything quite like this feel free to delete if I overlooked it.\r\n\r\nWe are running s3fs on amazon ec2 and at a shell window if you simply try and do \"ls\" on a directory that has a lot of files or subdirectories (don't have numbers but I'd say \"a lot\" means roughly in the hundreds) the response time is terrible.\r\n\r\nThe same type of thing happens if I'm in bash and attempt tab completion on a partial file name btw.  If it's a directory with lots of files it just hangs.\r\n\r\nSometimes if I wait a long time (like minutes) it will eventually return, but other times I just give up and kill the window (ctrl-c sometimes can get me back to a shell window but not always).\r\n\r\nI don't have the problem with directories with fewer files (say less than a hundred).  There the response time isn't super fast but is acceptable."},"comment":{"url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/comments/184595794","html_url":"https://github.com/s3fs-fuse/s3fs-fuse/issues/158#issuecomment-184595794","issue_url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/158","id":184595794,"user":{"login":"hryang","id":626967,"avatar_url":"https://avatars.githubusercontent.com/u/626967?v=3","gravatar_id":"","url":"https://api.github.com/users/hryang","html_url":"https://github.com/hryang","followers_url":"https://api.github.com/users/hryang/followers","following_url":"https://api.github.com/users/hryang/following{/other_user}","gists_url":"https://api.github.com/users/hryang/gists{/gist_id}","starred_url":"https://api.github.com/users/hryang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hryang/subscriptions","organizations_url":"https://api.github.com/users/hryang/orgs","repos_url":"https://api.github.com/users/hryang/repos","events_url":"https://api.github.com/users/hryang/events{/privacy}","received_events_url":"https://api.github.com/users/hryang/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T09:28:55Z","updated_at":"2016-02-16T09:28:55Z","body":"@davidqhogan \r\n\r\n1. Suppose directory d contains n files, \"ls d\" triggers: 1 opendir + 1 readdir + n getattr fuse calls. When n is large, the  getattr calls become bottleneck. \"ls -f\" removes the getattr calls, then improve the performance.\r\n\r\n2. You can set larger stat cache max size, -omax_stat_cache_size=xxx. The first \"ls\" is slow, but the subsequent ones should be very fast. "}}