{"action":"created","issue":{"url":"https://api.github.com/repos/colour-science/colour-demosaicing/issues/10","repository_url":"https://api.github.com/repos/colour-science/colour-demosaicing","labels_url":"https://api.github.com/repos/colour-science/colour-demosaicing/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/colour-science/colour-demosaicing/issues/10/comments","events_url":"https://api.github.com/repos/colour-science/colour-demosaicing/issues/10/events","html_url":"https://github.com/colour-science/colour-demosaicing/pull/10","id":377966630,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NzgzMTc2","number":10,"title":"Add garbage collection to reduce memory consumption","user":{"login":"MaxSchambach","id":28300359,"node_id":"MDQ6VXNlcjI4MzAwMzU5","avatar_url":"https://avatars2.githubusercontent.com/u/28300359?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxSchambach","html_url":"https://github.com/MaxSchambach","followers_url":"https://api.github.com/users/MaxSchambach/followers","following_url":"https://api.github.com/users/MaxSchambach/following{/other_user}","gists_url":"https://api.github.com/users/MaxSchambach/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxSchambach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxSchambach/subscriptions","organizations_url":"https://api.github.com/users/MaxSchambach/orgs","repos_url":"https://api.github.com/users/MaxSchambach/repos","events_url":"https://api.github.com/users/MaxSchambach/events{/privacy}","received_events_url":"https://api.github.com/users/MaxSchambach/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-06T18:00:11Z","updated_at":"2018-11-07T07:01:05Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/colour-science/colour-demosaicing/pulls/10","html_url":"https://github.com/colour-science/colour-demosaicing/pull/10","diff_url":"https://github.com/colour-science/colour-demosaicing/pull/10.diff","patch_url":"https://github.com/colour-science/colour-demosaicing/pull/10.patch"},"body":"# Summary\r\nAdded explicit deletion and garbage collection of temporary variables to reduce the memory consumption of the demosaicing methods.\r\n\r\n# Description\r\nIn particular for the demosaicing method by Menon, I have noticed a huge memory consumption. In one particular case I was not able to demosaic a large image (around 7000 x 5000) with 14 GB of available memory. By introducing the explicit deletion and garbage collection, I was able to tone it down to 5 GB in that particular case. I've added the garbage collection to the other demosaicing methods as well, even though the gain in memory usage is not as big."},"comment":{"url":"https://api.github.com/repos/colour-science/colour-demosaicing/issues/comments/436524319","html_url":"https://github.com/colour-science/colour-demosaicing/pull/10#issuecomment-436524319","issue_url":"https://api.github.com/repos/colour-science/colour-demosaicing/issues/10","id":436524319,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjUyNDMxOQ==","user":{"login":"KelSolaar","id":99779,"node_id":"MDQ6VXNlcjk5Nzc5","avatar_url":"https://avatars1.githubusercontent.com/u/99779?v=4","gravatar_id":"","url":"https://api.github.com/users/KelSolaar","html_url":"https://github.com/KelSolaar","followers_url":"https://api.github.com/users/KelSolaar/followers","following_url":"https://api.github.com/users/KelSolaar/following{/other_user}","gists_url":"https://api.github.com/users/KelSolaar/gists{/gist_id}","starred_url":"https://api.github.com/users/KelSolaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KelSolaar/subscriptions","organizations_url":"https://api.github.com/users/KelSolaar/orgs","repos_url":"https://api.github.com/users/KelSolaar/repos","events_url":"https://api.github.com/users/KelSolaar/events{/privacy}","received_events_url":"https://api.github.com/users/KelSolaar/received_events","type":"User","site_admin":false},"created_at":"2018-11-07T07:01:05Z","updated_at":"2018-11-07T07:01:05Z","author_association":"MEMBER","body":"Hi @MaxSchambach,\r\n\r\nIt totally does make sense and I had the issue when multi-processing some heavy dataset too. I did not go down that road because I find the manual deletion and garbage collection invocation quite unelegant and once you start pepper your code with that. It is hard to find a sweet spot where to stop. \r\n\r\nIdeally what I would like the implementation to be is a one-liner function call that takes care of both deletion and garbage collection while also deactivating the behaviour, problem is that I assume if it is possible at all it will require some massaging because the variables will be scoped in the responsible function.\r\n\r\nI'm happy to merge the PR either way but keen to discuss about that if you can think about an elegant solution."}}
{"actor":{"display_login":"KelSolaar"}}