{"action":"created","issue":{"url":"https://api.github.com/repos/sugarlabs/sugar/issues/520","labels_url":"https://api.github.com/repos/sugarlabs/sugar/issues/520/labels{/name}","comments_url":"https://api.github.com/repos/sugarlabs/sugar/issues/520/comments","events_url":"https://api.github.com/repos/sugarlabs/sugar/issues/520/events","html_url":"https://github.com/sugarlabs/sugar/pull/520","id":81997128,"number":520,"title":"Update metadata in the treeview without reload all - Fixes #4852","user":{"login":"godiard","id":4050778,"avatar_url":"https://avatars.githubusercontent.com/u/4050778?v=3","gravatar_id":"","url":"https://api.github.com/users/godiard","html_url":"https://github.com/godiard","followers_url":"https://api.github.com/users/godiard/followers","following_url":"https://api.github.com/users/godiard/following{/other_user}","gists_url":"https://api.github.com/users/godiard/gists{/gist_id}","starred_url":"https://api.github.com/users/godiard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godiard/subscriptions","organizations_url":"https://api.github.com/users/godiard/orgs","repos_url":"https://api.github.com/users/godiard/repos","events_url":"https://api.github.com/users/godiard/events{/privacy}","received_events_url":"https://api.github.com/users/godiard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sugarlabs/sugar/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/sugarlabs/sugar/milestones/5","html_url":"https://github.com/sugarlabs/sugar/milestones/0.108%20Features","labels_url":"https://api.github.com/repos/sugarlabs/sugar/milestones/5/labels","id":1146853,"number":5,"title":"0.108 Features","description":"Features for next release","creator":{"login":"samdroid-apps","id":6022042,"avatar_url":"https://avatars.githubusercontent.com/u/6022042?v=3","gravatar_id":"","url":"https://api.github.com/users/samdroid-apps","html_url":"https://github.com/samdroid-apps","followers_url":"https://api.github.com/users/samdroid-apps/followers","following_url":"https://api.github.com/users/samdroid-apps/following{/other_user}","gists_url":"https://api.github.com/users/samdroid-apps/gists{/gist_id}","starred_url":"https://api.github.com/users/samdroid-apps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdroid-apps/subscriptions","organizations_url":"https://api.github.com/users/samdroid-apps/orgs","repos_url":"https://api.github.com/users/samdroid-apps/repos","events_url":"https://api.github.com/users/samdroid-apps/events{/privacy}","received_events_url":"https://api.github.com/users/samdroid-apps/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":8,"state":"open","created_at":"2015-06-03T09:54:03Z","updated_at":"2015-10-05T23:11:47Z","due_on":null,"closed_at":null},"comments":19,"created_at":"2015-05-28T15:52:19Z","updated_at":"2015-10-06T03:00:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sugarlabs/sugar/pulls/520","html_url":"https://github.com/sugarlabs/sugar/pull/520","diff_url":"https://github.com/sugarlabs/sugar/pull/520.diff","patch_url":"https://github.com/sugarlabs/sugar/pull/520.patch"},"body":"Implement a set_value method in the model, and move the logic\r\nto write to the datastore to the ListModel. To be able to\r\nupdate the model without trigger a update in the treeview,\r\nwe pass the updated callback in the ListModel.setup() method,\r\nand the callback is disconnected and connected in every update.\r\n\r\nThe treeview have the responsabilty of redraw the cell after\r\nthe change was done.\r\n\r\nThe listmodel stores a dictionary with the entries uodated,\r\nto provide that data until the next update in the Journal.\r\n\r\nThis patch is heavily based in the work of\r\nSam Parkinson <sam.parkinson3@gmail.com>"},"comment":{"url":"https://api.github.com/repos/sugarlabs/sugar/issues/comments/145729415","html_url":"https://github.com/sugarlabs/sugar/pull/520#issuecomment-145729415","issue_url":"https://api.github.com/repos/sugarlabs/sugar/issues/520","id":145729415,"user":{"login":"quozl","id":2936481,"avatar_url":"https://avatars.githubusercontent.com/u/2936481?v=3","gravatar_id":"","url":"https://api.github.com/users/quozl","html_url":"https://github.com/quozl","followers_url":"https://api.github.com/users/quozl/followers","following_url":"https://api.github.com/users/quozl/following{/other_user}","gists_url":"https://api.github.com/users/quozl/gists{/gist_id}","starred_url":"https://api.github.com/users/quozl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quozl/subscriptions","organizations_url":"https://api.github.com/users/quozl/orgs","repos_url":"https://api.github.com/users/quozl/repos","events_url":"https://api.github.com/users/quozl/events{/privacy}","received_events_url":"https://api.github.com/users/quozl/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T03:00:16Z","updated_at":"2015-10-06T03:00:16Z","body":"Thanks.  Ach, crivens, I smell a rat! :rat:\r\n\r\nI did a quick test of several normal UI transitions in Sugar 0.106 while monitoring VmSize of Jarabe.  Every single transition tested leaks some amount of memory, which over time will accumulate unless there's something to clean it up.  It is critical on the XO-1, which only has 256 MB of RAM.\r\n\r\nLeak rate, KB/sec | Transition\r\n------------ | -------------\r\n15 | home view list and ring switching\r\n18 | home view and journal switching (f3/f4)\r\n21 | frame show and hide\r\n57 | network and buddies switching (f1/f2)\r\n85 | network and home view switching (f1/f3)\r\n\r\nIt will be interesting to see what causes this.  As you see the same leak rate with and without your patch, my guess is that we have a wider problem.  No need to hold up your patch.\r\n\r\nMy log analysis script:\r\n\r\n```\r\n#!/usr/bin/python\r\nimport glob\r\n\r\nfor name in glob.glob('memory*.log'):\r\n    lines = file(name, 'r').readlines()\r\n    t0 = float(lines[0].split()[0])\r\n    t1 = float(lines[-1].split()[0])\r\n    v0 = float(lines[0].split()[1])\r\n    v1 = float(lines[-1].split()[1])\r\n    print '%.0f | %s' % (((v1 - v0) / (t1 - t0)), name)\r\n```\r\n"}}