{"action":"created","issue":{"url":"https://api.github.com/repos/root-project/root/issues/2483","repository_url":"https://api.github.com/repos/root-project/root","labels_url":"https://api.github.com/repos/root-project/root/issues/2483/labels{/name}","comments_url":"https://api.github.com/repos/root-project/root/issues/2483/comments","events_url":"https://api.github.com/repos/root-project/root/issues/2483/events","html_url":"https://github.com/root-project/root/pull/2483","id":351516895,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MDg4NjE0","number":2483,"title":"Implement parsing cache for the LookupHelper.","user":{"login":"vgvassilev","id":6516307,"node_id":"MDQ6VXNlcjY1MTYzMDc=","avatar_url":"https://avatars1.githubusercontent.com/u/6516307?v=4","gravatar_id":"","url":"https://api.github.com/users/vgvassilev","html_url":"https://github.com/vgvassilev","followers_url":"https://api.github.com/users/vgvassilev/followers","following_url":"https://api.github.com/users/vgvassilev/following{/other_user}","gists_url":"https://api.github.com/users/vgvassilev/gists{/gist_id}","starred_url":"https://api.github.com/users/vgvassilev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgvassilev/subscriptions","organizations_url":"https://api.github.com/users/vgvassilev/orgs","repos_url":"https://api.github.com/users/vgvassilev/repos","events_url":"https://api.github.com/users/vgvassilev/events{/privacy}","received_events_url":"https://api.github.com/users/vgvassilev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"vgvassilev","id":6516307,"node_id":"MDQ6VXNlcjY1MTYzMDc=","avatar_url":"https://avatars1.githubusercontent.com/u/6516307?v=4","gravatar_id":"","url":"https://api.github.com/users/vgvassilev","html_url":"https://github.com/vgvassilev","followers_url":"https://api.github.com/users/vgvassilev/followers","following_url":"https://api.github.com/users/vgvassilev/following{/other_user}","gists_url":"https://api.github.com/users/vgvassilev/gists{/gist_id}","starred_url":"https://api.github.com/users/vgvassilev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgvassilev/subscriptions","organizations_url":"https://api.github.com/users/vgvassilev/orgs","repos_url":"https://api.github.com/users/vgvassilev/repos","events_url":"https://api.github.com/users/vgvassilev/events{/privacy}","received_events_url":"https://api.github.com/users/vgvassilev/received_events","type":"User","site_admin":false},"assignees":[{"login":"vgvassilev","id":6516307,"node_id":"MDQ6VXNlcjY1MTYzMDc=","avatar_url":"https://avatars1.githubusercontent.com/u/6516307?v=4","gravatar_id":"","url":"https://api.github.com/users/vgvassilev","html_url":"https://github.com/vgvassilev","followers_url":"https://api.github.com/users/vgvassilev/followers","following_url":"https://api.github.com/users/vgvassilev/following{/other_user}","gists_url":"https://api.github.com/users/vgvassilev/gists{/gist_id}","starred_url":"https://api.github.com/users/vgvassilev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgvassilev/subscriptions","organizations_url":"https://api.github.com/users/vgvassilev/orgs","repos_url":"https://api.github.com/users/vgvassilev/repos","events_url":"https://api.github.com/users/vgvassilev/events{/privacy}","received_events_url":"https://api.github.com/users/vgvassilev/received_events","type":"User","site_admin":false}],"milestone":null,"comments":25,"created_at":"2018-08-17T09:10:26Z","updated_at":"2018-08-24T20:34:24Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/root-project/root/pulls/2483","html_url":"https://github.com/root-project/root/pull/2483","diff_url":"https://github.com/root-project/root/pull/2483.diff","patch_url":"https://github.com/root-project/root/pull/2483.patch"},"body":"The operations done by the LookupHelper are costly in both memory and\r\nperformance. Almost every operation requires memory allocation and parsing\r\nof often non-trivial C++ code.\r\n\r\nUnfortunately, the LookupHelper is used very intensively by rootcling and\r\nROOT. The callers usually do not use any caching mechanisms and redo the\r\nexpensive operations over and over even though the answer is known to be\r\nthe same as before. For instance, building the dictionary of shows:\r\n\r\n```\r\nMathCore:\r\n  Cached entries: 217\r\n  Total parse requests: 54051\r\n  Cache hits: 53834\r\nTreePlayer:\r\n  Cached entries: 183\r\n  Total parse requests: 57697\r\n  Cache hits: 57514\r\n```\r\n\r\nThis patch introduces the first set of caching functionality. In\r\nparticular, each LookupHelper::find* function allocates a memory buffer\r\nwhich is then stored in the clang::SourceManager. We hash the buffer\r\ncontent and keep a mapping between a hash and FileID and next time we\r\nencounter the same content we do not allocate a new FileID but reuse the\r\nold one. We see decrease in memory footprint by 7% for non-cxxmodules ROOT.\r\n\r\nFor cxxmodules we see significant reduction of the pcm sizes (by half)\r\nwhich translates into rss improvements:\r\n\r\n```\r\n  master before:\r\n    cpu  time = 0.291462 seconds\r\n    sys  time = 0.064409 seconds\r\n    res  memory = 345.816 Mbytes\r\n    vir  memory = 573.508 Mbytes\r\n  master after:\r\n   cpu  time = 0.235828 seconds\r\n   sys  time = 0.098327 seconds\r\n   res  memory = 260.012 Mbytes\r\n   vir  memory = 377.945 Mbytes\r\n```\r\n\r\nPatch by Yuka Takahashi and me."},"comment":{"url":"https://api.github.com/repos/root-project/root/issues/comments/415875146","html_url":"https://github.com/root-project/root/pull/2483#issuecomment-415875146","issue_url":"https://api.github.com/repos/root-project/root/issues/2483","id":415875146,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTg3NTE0Ng==","user":{"login":"phsft-bot","id":25639015,"node_id":"MDQ6VXNlcjI1NjM5MDE1","avatar_url":"https://avatars1.githubusercontent.com/u/25639015?v=4","gravatar_id":"","url":"https://api.github.com/users/phsft-bot","html_url":"https://github.com/phsft-bot","followers_url":"https://api.github.com/users/phsft-bot/followers","following_url":"https://api.github.com/users/phsft-bot/following{/other_user}","gists_url":"https://api.github.com/users/phsft-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/phsft-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phsft-bot/subscriptions","organizations_url":"https://api.github.com/users/phsft-bot/orgs","repos_url":"https://api.github.com/users/phsft-bot/repos","events_url":"https://api.github.com/users/phsft-bot/events{/privacy}","received_events_url":"https://api.github.com/users/phsft-bot/received_events","type":"User","site_admin":false},"created_at":"2018-08-24T20:34:24Z","updated_at":"2018-08-24T20:34:24Z","author_association":"COLLABORATOR","body":"Starting build on `slc6`/`gcc48`, `slc6-i686`/`gcc49`, `centos7`/`clang39`, `centos7`/`gcc62`, `centos7`/`gcc7`, `fedora28`/`native`, `ubuntu16`/`native`, `mac1013`/`native`, `windows10`/`vc15` with flags `-Dccache=ON`\n[How to customize builds](https://github.com/phsft-bot/build-configuration/blob/master/README.md)"}}
{"actor":{"display_login":"phsft-bot"}}