{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/24421","repository_url":"https://api.github.com/repos/owncloud/core","labels_url":"https://api.github.com/repos/owncloud/core/issues/24421/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/24421/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/24421/events","html_url":"https://github.com/owncloud/core/issues/24421","id":152786296,"number":24421,"title":"Get rid of cleanFolder() in the Watcher if possible for performance","user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/performance","name":"performance","color":"fbca04"},{"url":"https://api.github.com/repos/owncloud/core/labels/technical%20debt","name":"technical debt","color":"FFFF00"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-03T14:23:42Z","updated_at":"2016-05-03T14:24:33Z","closed_at":null,"body":"After debugging the watcher/scanner, I noticed that at the end of the scan session it will call `cleanFolder($path)' and will iterate over all cache entries inside that folder and call `file_exists` to find out whether the file still exists.\r\n\r\nAs far as I understand, diffing the children of a folder is already done in `scanChildren`, so not sure why it has to be done again here.\r\n\r\n@icewind1991 can you clarify ? Can we get rid of this extra cleanup to gain some performance ?\r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/216544866","html_url":"https://github.com/owncloud/core/issues/24421#issuecomment-216544866","issue_url":"https://api.github.com/repos/owncloud/core/issues/24421","id":216544866,"user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T14:24:33Z","updated_at":"2016-05-03T14:24:33Z","body":"https://github.com/owncloud/core/blob/v9.0.1/lib/private/files/cache/watcher.php#L132"}}