{"action":"created","issue":{"url":"https://api.github.com/repos/igraph/python-igraph/issues/7","labels_url":"https://api.github.com/repos/igraph/python-igraph/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/igraph/python-igraph/issues/7/comments","events_url":"https://api.github.com/repos/igraph/python-igraph/issues/7/events","html_url":"https://github.com/igraph/python-igraph/issues/7","id":54382736,"number":7,"title":"pickle format memory leaks","user":{"login":"gaborcsardi","id":660288,"avatar_url":"https://avatars.githubusercontent.com/u/660288?v=3","gravatar_id":"","url":"https://api.github.com/users/gaborcsardi","html_url":"https://github.com/gaborcsardi","followers_url":"https://api.github.com/users/gaborcsardi/followers","following_url":"https://api.github.com/users/gaborcsardi/following{/other_user}","gists_url":"https://api.github.com/users/gaborcsardi/gists{/gist_id}","starred_url":"https://api.github.com/users/gaborcsardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaborcsardi/subscriptions","organizations_url":"https://api.github.com/users/gaborcsardi/orgs","repos_url":"https://api.github.com/users/gaborcsardi/repos","events_url":"https://api.github.com/users/gaborcsardi/events{/privacy}","received_events_url":"https://api.github.com/users/gaborcsardi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/igraph/python-igraph/labels/Confirmed","name":"Confirmed","color":"ededed"},{"url":"https://api.github.com/repos/igraph/python-igraph/labels/Low","name":"Low","color":"ededed"},{"url":"https://api.github.com/repos/igraph/python-igraph/labels/Python","name":"Python","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"ntamas","id":195637,"avatar_url":"https://avatars.githubusercontent.com/u/195637?v=3","gravatar_id":"","url":"https://api.github.com/users/ntamas","html_url":"https://github.com/ntamas","followers_url":"https://api.github.com/users/ntamas/followers","following_url":"https://api.github.com/users/ntamas/following{/other_user}","gists_url":"https://api.github.com/users/ntamas/gists{/gist_id}","starred_url":"https://api.github.com/users/ntamas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntamas/subscriptions","organizations_url":"https://api.github.com/users/ntamas/orgs","repos_url":"https://api.github.com/users/ntamas/repos","events_url":"https://api.github.com/users/ntamas/events{/privacy}","received_events_url":"https://api.github.com/users/ntamas/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-01-14T21:57:27Z","updated_at":"2015-01-14T21:57:29Z","closed_at":null,"body":"_From @gaborcsardi on May 4, 2013 18:58_\n\nthe pickle format (or at least the reading) leaks memory - pickle_loop(large_graph, True) in the attached test demonstrates this.\n\nI don't know if this is igraph's fault, or pickle's fault, but I also found that:\n- pickle with a simpler data structure doesn't memory leak - pickle_loop(large_range, True) in the attached test\n- igraph using (eg) write_graphml, doesn't memory leak either.  - write_loop(large_graph, True) in the attached test\n\nThis is probably low priority, but I thought I'd report this bug anyway, since it's hopefully useful to people that need to un/serialise lots of graphs, that come up against this memory leak issue. If you don't need pickle's ability to eg. serialise almost any python object as an attribute in the graph, then graphml+zlib performs better than pickle (both in terms of speed, and size of serialised format), and doesn't memory leak either.\n\n------------------------------------\nImported from Launchpad using lp2gh.\n\n * date created: 2010-04-19T20:30:38Z\n * owner: infinity0\n * assignee: ntamas\n * the launchpad url was https://bugs.launchpad.net/bugs/566902\n\n\n_Copied from original issue: igraph/igraph#271_"},"comment":{"url":"https://api.github.com/repos/igraph/python-igraph/issues/comments/70000313","html_url":"https://github.com/igraph/python-igraph/issues/7#issuecomment-70000313","issue_url":"https://api.github.com/repos/igraph/python-igraph/issues/7","id":70000313,"user":{"login":"gaborcsardi","id":660288,"avatar_url":"https://avatars.githubusercontent.com/u/660288?v=3","gravatar_id":"","url":"https://api.github.com/users/gaborcsardi","html_url":"https://github.com/gaborcsardi","followers_url":"https://api.github.com/users/gaborcsardi/followers","following_url":"https://api.github.com/users/gaborcsardi/following{/other_user}","gists_url":"https://api.github.com/users/gaborcsardi/gists{/gist_id}","starred_url":"https://api.github.com/users/gaborcsardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaborcsardi/subscriptions","organizations_url":"https://api.github.com/users/gaborcsardi/orgs","repos_url":"https://api.github.com/users/gaborcsardi/repos","events_url":"https://api.github.com/users/gaborcsardi/events{/privacy}","received_events_url":"https://api.github.com/users/gaborcsardi/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T21:57:29Z","updated_at":"2015-01-14T21:57:29Z","body":"(by ntamas)\nSome more details:\n\n- the leak happens with smaller graphs as well (if they have at least a single edge)\n- the leak does not happen if I create the graph with the same call that unpickling would have used. Since unpickling just calls the appropriate __init__ method, this is weird.\n\nWill investigate further when time allows."}}