{"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":3,"created_at":"2018-11-06T18:00:11Z","updated_at":"2018-11-07T09:16:50Z","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/436556964","html_url":"https://github.com/colour-science/colour-demosaicing/pull/10#issuecomment-436556964","issue_url":"https://api.github.com/repos/colour-science/colour-demosaicing/issues/10","id":436556964,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjU1Njk2NA==","user":{"login":"MichaelMauderer","id":1428930,"node_id":"MDQ6VXNlcjE0Mjg5MzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1428930?v=4","gravatar_id":"","url":"https://api.github.com/users/MichaelMauderer","html_url":"https://github.com/MichaelMauderer","followers_url":"https://api.github.com/users/MichaelMauderer/followers","following_url":"https://api.github.com/users/MichaelMauderer/following{/other_user}","gists_url":"https://api.github.com/users/MichaelMauderer/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelMauderer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelMauderer/subscriptions","organizations_url":"https://api.github.com/users/MichaelMauderer/orgs","repos_url":"https://api.github.com/users/MichaelMauderer/repos","events_url":"https://api.github.com/users/MichaelMauderer/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelMauderer/received_events","type":"User","site_admin":false},"created_at":"2018-11-07T09:16:50Z","updated_at":"2018-11-07T09:16:50Z","author_association":"MEMBER","body":"An additional thought: it might be good to benchmark how this affects the\nperformance of other use cases (i.e., calling the function often with\nsmaller input). I could imagine that manually calling the GC that often\ncould lead to a big performance hit.\n\nI assume just deleting the variables without manually calling the GC didn't\nlead to the memory being freed in a timely manner?\n\nOn Wed, 7 Nov 2018 at 08:37, Maximilian Schambach <notifications@github.com>\nwrote:\n\n> Yes, it is not the most elegant way in general, but the most\n> straightforward.\n>\n> Introducing a cleanup-function, in my opinion, might not be a lot more\n> elegant, but makes things less Pythonic by being less explicit (in my\n> opinion): the function still would need to get passed the variables to\n> delete, so basically you're hiding the explicit deletion and garbage\n> collection in some wrapper. I've had the problem in other Python\n> applications too, and am not too happy about this solution, but I think in\n> this case, with only 3 files being affected and only a couple of deletions,\n> it is very much the best straightforward and in that sense the most elegant\n> solution to deal with this.\n>\n> If somebody knows a more Pythonic way to deal with this, I'd be happy to\n> learn :)\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/colour-science/colour-demosaicing/pull/10#issuecomment-436546030>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABXNwtKOV0lfJFYnagPXU6XZGzdxauKqks5uspu0gaJpZM4YQ-gu>\n> .\n>\n"}}
{"actor":{"display_login":"MichaelMauderer"}}