{"action":"created","issue":{"url":"https://api.github.com/repos/root-project/root/issues/1814","repository_url":"https://api.github.com/repos/root-project/root","labels_url":"https://api.github.com/repos/root-project/root/issues/1814/labels{/name}","comments_url":"https://api.github.com/repos/root-project/root/issues/1814/comments","events_url":"https://api.github.com/repos/root-project/root/issues/1814/events","html_url":"https://github.com/root-project/root/pull/1814","id":310822780,"number":1814,"title":"[cxxmodules] Fix failing runtime_cxxmodules tests by preloading modules","user":{"login":"yamaguchi1024","id":12247908,"avatar_url":"https://avatars0.githubusercontent.com/u/12247908?v=4","gravatar_id":"","url":"https://api.github.com/users/yamaguchi1024","html_url":"https://github.com/yamaguchi1024","followers_url":"https://api.github.com/users/yamaguchi1024/followers","following_url":"https://api.github.com/users/yamaguchi1024/following{/other_user}","gists_url":"https://api.github.com/users/yamaguchi1024/gists{/gist_id}","starred_url":"https://api.github.com/users/yamaguchi1024/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamaguchi1024/subscriptions","organizations_url":"https://api.github.com/users/yamaguchi1024/orgs","repos_url":"https://api.github.com/users/yamaguchi1024/repos","events_url":"https://api.github.com/users/yamaguchi1024/events{/privacy}","received_events_url":"https://api.github.com/users/yamaguchi1024/received_events","type":"User","site_admin":false},"labels":[{"id":651918276,"url":"https://api.github.com/repos/root-project/root/labels/needs%20review","name":"needs review","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":{"login":"vgvassilev","id":6516307,"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,"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":197,"created_at":"2018-04-03T12:49:38Z","updated_at":"2018-05-15T16:15:06Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/root-project/root/pulls/1814","html_url":"https://github.com/root-project/root/pull/1814","diff_url":"https://github.com/root-project/root/pull/1814.diff","patch_url":"https://github.com/root-project/root/pull/1814.patch"},"body":"Currently, 36 tests are failing for runtime modules:\r\nhttps://epsft-jenkins.cern.ch/view/ROOT/job/root-nightly-runtime-cxxmodules/\r\nWe want to make these test pass so that we can say that the runtime modules is\r\nfinally working.\r\n\r\nThis patch enables ROOT to preload all modules at startup time. In my\r\nenvironment, this patch fixes 14 tests for runtime cxxmodules.\r\n\r\nPreloading all the modules has several advantages. 1. We do not have to\r\nrely on rootmap files which don't support some features (namespaces and\r\n    templates) 2. Lookup would be faster because we don't have to do\r\ntrampoline via rootmap files.\r\n\r\nThe only disadvantage of preloading all the modules is the startup time performance.\r\n`root.exe -q -l memory.C`\r\nThis is a release build without modules:\r\n```\r\n cpu  time = 0.091694 seconds\r\n sys  time = 0.026187 seconds\r\n res  memory = 133.008 Mbytes\r\n vir  memory = 217.742 Mbytes\r\n```\r\nThis is a release build with modules, with this patch:\r\n```\r\n cpu  time = 0.234134 seconds\r\n sys  time = 0.066774 seconds\r\n res  memory = 275.301 Mbytes\r\n vir  memory = 491.832 Mbytes\r\n```\r\nAs you can see, preloading all the modules makes both time and memory 2\r\nto 3 times worse **at a startup time**.\r\n\r\n**Edit** : With hsimple.C\r\n`root.exe -l -b tutorials/hsimple.C -q ~/CERN/ROOT/memory.C`\r\nRelease build without modules:\r\n```\r\nProcessing tutorials/hsimple.C...                                                                        \r\nhsimple   : Real Time =   0.04 seconds Cpu Time =   0.05 seconds                        \r\n(TFile *) 0x555ae2a9d560                                                                  \r\nProcessing /home/yuka/CERN/ROOT/memory.C...                                                              \r\n cpu  time = 0.173591 seconds                                   \r\n sys  time = 0.011835 seconds                       \r\n res  memory = 135.32 Mbytes                                    \r\n vir  memory = 209.664 Mbytes \r\n```\r\nRelease build with modules, with this patch:\r\n```\r\nProcessing tutorials/hsimple.C...\r\nhsimple   : Real Time =   0.04 seconds Cpu Time =   0.04 seconds\r\n(TFile *) 0x55d1b036d230\r\nProcessing /home/yuka/CERN/ROOT/memory.C...\r\n cpu  time = 0.290742 seconds\r\n sys  time = 0.043851 seconds\r\n res  memory = 256.844 Mbytes\r\n vir  memory = 438.484 Mbytes\r\n```\r\n\r\nHowever, it is a matter of course that we get slower startup time if we\r\ntry to load all the modules at startup time, not on-demand. I haven't had a good benchmark for this but, in theory, it reduces execution time instead as we're anyway loading modules after the startup."},"comment":{"url":"https://api.github.com/repos/root-project/root/issues/comments/389225552","html_url":"https://github.com/root-project/root/pull/1814#issuecomment-389225552","issue_url":"https://api.github.com/repos/root-project/root/issues/1814","id":389225552,"user":{"login":"phsft-bot","id":25639015,"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-05-15T16:15:06Z","updated_at":"2018-05-15T16:15:06Z","author_association":"COLLABORATOR","body":"Build failed on windows10/vc15.\n[See console output](https://epsft-jenkins.cern.ch/job/root-pullrequests-build/25972/console).\n"}}
{"actor":{"display_login":"phsft-bot"}}