{"action":"created","issue":{"url":"https://api.github.com/repos/plouj/syncthing/issues/10","repository_url":"https://api.github.com/repos/plouj/syncthing","labels_url":"https://api.github.com/repos/plouj/syncthing/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/plouj/syncthing/issues/10/comments","events_url":"https://api.github.com/repos/plouj/syncthing/issues/10/events","html_url":"https://github.com/plouj/syncthing/pull/10","id":190526754,"number":10,"title":"Aggregate immediately on every incoming event (based on syncthing-inotify)","user":{"login":"imsodin","id":15955093,"avatar_url":"https://avatars.githubusercontent.com/u/15955093?v=3","gravatar_id":"","url":"https://api.github.com/users/imsodin","html_url":"https://github.com/imsodin","followers_url":"https://api.github.com/users/imsodin/followers","following_url":"https://api.github.com/users/imsodin/following{/other_user}","gists_url":"https://api.github.com/users/imsodin/gists{/gist_id}","starred_url":"https://api.github.com/users/imsodin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imsodin/subscriptions","organizations_url":"https://api.github.com/users/imsodin/orgs","repos_url":"https://api.github.com/users/imsodin/repos","events_url":"https://api.github.com/users/imsodin/events{/privacy}","received_events_url":"https://api.github.com/users/imsodin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-19T23:07:56Z","updated_at":"2016-11-22T14:52:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/plouj/syncthing/pulls/10","html_url":"https://github.com/plouj/syncthing/pull/10","diff_url":"https://github.com/plouj/syncthing/pull/10.diff","patch_url":"https://github.com/plouj/syncthing/pull/10.patch"},"body":"I adapted the approach taken in syncthing-inotify to aggregate events. The system of when an event is tracked or dropped in favor of scanning the entire directory is the same, but this is no longer done periodically but whenever the change comes in. This needs some information about currently tracked dirs to be stored, which is done in the `fswatcher.trackedDirs` map. Any new event is stored in there. On timer events that are older than the current interval are passed to the scanner and removed from `trackedDirs`. This makes it much less likely that the `maxFiles` cap is hit and thus the entire folder scanned, while still informing about all relevant folders/files.\r\n\r\nAnd a note on the notify delays: The slownotifydelay could be indefinite, in syncthing-inotify this was approximated the scan interval, which I adopted here. Additionally in syncthing-inotify it is possible to adjust the scan delay. We should allow for this as well, which is easily done, just make `shortNotifyDelay` configurable."},"comment":{"url":"https://api.github.com/repos/plouj/syncthing/issues/comments/262260854","html_url":"https://github.com/plouj/syncthing/pull/10#issuecomment-262260854","issue_url":"https://api.github.com/repos/plouj/syncthing/issues/10","id":262260854,"user":{"login":"plouj","id":282428,"avatar_url":"https://avatars.githubusercontent.com/u/282428?v=3","gravatar_id":"","url":"https://api.github.com/users/plouj","html_url":"https://github.com/plouj","followers_url":"https://api.github.com/users/plouj/followers","following_url":"https://api.github.com/users/plouj/following{/other_user}","gists_url":"https://api.github.com/users/plouj/gists{/gist_id}","starred_url":"https://api.github.com/users/plouj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plouj/subscriptions","organizations_url":"https://api.github.com/users/plouj/orgs","repos_url":"https://api.github.com/users/plouj/repos","events_url":"https://api.github.com/users/plouj/events{/privacy}","received_events_url":"https://api.github.com/users/plouj/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T14:52:19Z","updated_at":"2016-11-22T14:52:19Z","body":"It's called https://en.wikipedia.org/wiki/Command%E2%80%93query_separation if you're curious. Thanks for fixing the code, I'll look at it tonight.\r\n\r\nWhen you have some attempted but reverted changes in between it would make it easier to read the diff if you squash all of these commits into one on top of my branch. I'm already just looking at ```diff plouj/plouj-fswatcher``` output to read the change as a whole."}}
{"actor":{"display_login":"plouj"}}