{"action":"created","issue":{"url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/3289","repository_url":"https://api.github.com/repos/Beep6581/RawTherapee","labels_url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/3289/labels{/name}","comments_url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/3289/comments","events_url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/3289/events","html_url":"https://github.com/Beep6581/RawTherapee/issues/3289","id":155085215,"number":3289,"title":"RT hangs when files in the file browser tab change or get deleted, or when batch processing","user":{"login":"da-phil","id":810285,"avatar_url":"https://avatars.githubusercontent.com/u/810285?v=3","gravatar_id":"","url":"https://api.github.com/users/da-phil","html_url":"https://github.com/da-phil","followers_url":"https://api.github.com/users/da-phil/followers","following_url":"https://api.github.com/users/da-phil/following{/other_user}","gists_url":"https://api.github.com/users/da-phil/gists{/gist_id}","starred_url":"https://api.github.com/users/da-phil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/da-phil/subscriptions","organizations_url":"https://api.github.com/users/da-phil/orgs","repos_url":"https://api.github.com/users/da-phil/repos","events_url":"https://api.github.com/users/da-phil/events{/privacy}","received_events_url":"https://api.github.com/users/da-phil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":31,"created_at":"2016-05-16T18:03:45Z","updated_at":"2016-09-08T08:42:22Z","closed_at":null,"body":"I'm using the latest commit on master\r\n```\r\nBranch: master\r\nVersion: 4.2.851\r\nChangeset: 80f86c7189c4b88ee51fddbef5874e312aedf648\r\n```\r\nRecently I noticed that RT hangs while files in the directory which is shown in the file browser tab change (when image is saved after editing) or get deleted. sometimes RT hangs for several seconds until the file browser keeps up with the changes.\r\n\r\nRT also becomes completely unresponsive when batch processing pictures, I always have to wait until all files are processed before I can do anything with the GUI again.\r\n"},"comment":{"url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/comments/245532190","html_url":"https://github.com/Beep6581/RawTherapee/issues/3289#issuecomment-245532190","issue_url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/3289","id":245532190,"user":{"login":"Floessie","id":10133457,"avatar_url":"https://avatars.githubusercontent.com/u/10133457?v=3","gravatar_id":"","url":"https://api.github.com/users/Floessie","html_url":"https://github.com/Floessie","followers_url":"https://api.github.com/users/Floessie/followers","following_url":"https://api.github.com/users/Floessie/following{/other_user}","gists_url":"https://api.github.com/users/Floessie/gists{/gist_id}","starred_url":"https://api.github.com/users/Floessie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Floessie/subscriptions","organizations_url":"https://api.github.com/users/Floessie/orgs","repos_url":"https://api.github.com/users/Floessie/repos","events_url":"https://api.github.com/users/Floessie/events{/privacy}","received_events_url":"https://api.github.com/users/Floessie/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T08:42:22Z","updated_at":"2016-09-08T08:42:22Z","body":"@da-phil Did some research to help you with your implementation:\r\n\r\n- Using `std::thread` and friends seems to be fine in GTK. The first \"GTK thread\" example I found used it as well.\r\n- `fileBrowser->getEntries()` is not thread-safe, but there is a chance if you extend `ThumbBrowserBase` with a function `std::vector<Glib::ustring> getFilenames() const` and use the `entryRW` rw-mutex with `MYREADERLOCK(l, entryRW)` like in e.g. `ThumbBrowserBase::enableTabMode()`.\r\n- `cacheMgr` and `_refreshProgressBar()` seem thread-safe.\r\n- The check, if a new file was added, could be compacted using `<algorithm>`, I guess. Making copies of the lists as `std::set<>` and using `std::set_*` on them would also yield `fileNamesToDel`.\r\n- `previewsLoaded` and `previewsToLoad` must be made `std::atomic<>`. Still there is a race potential with `dirSelected()` while you process the list. Be prepared... ;)\r\n- `fileNameList` must be protected by a mutex. This will only affect `closeDir()` and `dirSelected()`. Maybe use this mutex also for `previewsLoaded` and `previewsToLoad` (see above).\r\n\r\nAll told, this really seems to be doable, and you seem to have the skills to do so. :+1: If you get stuck, we will help, of course. Patches are okay, but if you expect several review iterations you might be better off forking here on GitHub so that we can easily test your branch. This is also better on the long run, if you like to contribute every now and then.\r\n\r\nHTH and good luck\r\nFlössie"}}
{"actor":{"display_login":"Floessie"}}