{"action":"created","issue":{"url":"https://api.github.com/repos/domokit/mojo/issues/86","labels_url":"https://api.github.com/repos/domokit/mojo/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/domokit/mojo/issues/86/comments","events_url":"https://api.github.com/repos/domokit/mojo/issues/86/events","html_url":"https://github.com/domokit/mojo/issues/86","id":67699980,"number":86,"title":"Starting up network service takes 500ms+ on Android","user":{"login":"jamesr","id":7497301,"avatar_url":"https://avatars.githubusercontent.com/u/7497301?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesr","html_url":"https://github.com/jamesr","followers_url":"https://api.github.com/users/jamesr/followers","following_url":"https://api.github.com/users/jamesr/following{/other_user}","gists_url":"https://api.github.com/users/jamesr/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesr/subscriptions","organizations_url":"https://api.github.com/users/jamesr/orgs","repos_url":"https://api.github.com/users/jamesr/repos","events_url":"https://api.github.com/users/jamesr/events{/privacy}","received_events_url":"https://api.github.com/users/jamesr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ppiet","id":1824302,"avatar_url":"https://avatars.githubusercontent.com/u/1824302?v=3","gravatar_id":"","url":"https://api.github.com/users/ppiet","html_url":"https://github.com/ppiet","followers_url":"https://api.github.com/users/ppiet/followers","following_url":"https://api.github.com/users/ppiet/following{/other_user}","gists_url":"https://api.github.com/users/ppiet/gists{/gist_id}","starred_url":"https://api.github.com/users/ppiet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppiet/subscriptions","organizations_url":"https://api.github.com/users/ppiet/orgs","repos_url":"https://api.github.com/users/ppiet/repos","events_url":"https://api.github.com/users/ppiet/events{/privacy}","received_events_url":"https://api.github.com/users/ppiet/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-04-10T23:02:13Z","updated_at":"2015-04-13T22:33:31Z","closed_at":null,"body":"It takes 500ms+ to start running the network service on Android. Since all apps have to download via this service, this means nothing can start up faster than this no matter how svelte it is.  Tracing shows that nearly all of this time is going into the Android handler startup sequence.  Once the service actually starts running, it's really fast.  Here's some tracing data under the AndroidHandler::RunApplication trace:\r\n\r\nName | Wall Duration (ms) | CPU Duration (ms) | Self Time (ms) | CPU Self Time (ms) | Occurrences\r\n-----|--------------------|-------------------|----------------|--------------------|------------\r\nBlockingCopyToFile | 35.291 | 23.529 | 35.291 | 23.529 | 1\r\nExtractBootstrapJavaLibrary | 1.085 | 1.029 | 1.085 | 1.029 | 1\r\nExtractBootstrapNativeLibrary | 4.858 | 4.759 | 4.858 | 4.759 | 1\r\nExtractApplicationJavaLibrary | 88.293 | 86.566 | 88.293 | 86.566 | 1\r\nExtractApplicationNativeLibrary | 61.988 | 57.028 | 61.988 | 57.028 | 1\r\nCreateDexClassLoader | 305.332 | 14.445 | 305.332 | 14.445 | 1\r\nTotals | 496.847 | 187.356 | 496.847 | 187.356 | 6\r\n\r\nThe fact that CreateDexClassLoader takes so long is particularly surprising since this service should have very little java.\r\n\r\n/cc @qsr @tonygentilcore "},"comment":{"url":"https://api.github.com/repos/domokit/mojo/issues/comments/92518712","html_url":"https://github.com/domokit/mojo/issues/86#issuecomment-92518712","issue_url":"https://api.github.com/repos/domokit/mojo/issues/86","id":92518712,"user":{"login":"ppiet","id":1824302,"avatar_url":"https://avatars.githubusercontent.com/u/1824302?v=3","gravatar_id":"","url":"https://api.github.com/users/ppiet","html_url":"https://github.com/ppiet","followers_url":"https://api.github.com/users/ppiet/followers","following_url":"https://api.github.com/users/ppiet/following{/other_user}","gists_url":"https://api.github.com/users/ppiet/gists{/gist_id}","starred_url":"https://api.github.com/users/ppiet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppiet/subscriptions","organizations_url":"https://api.github.com/users/ppiet/orgs","repos_url":"https://api.github.com/users/ppiet/repos","events_url":"https://api.github.com/users/ppiet/events{/privacy}","received_events_url":"https://api.github.com/users/ppiet/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T22:33:31Z","updated_at":"2015-04-13T22:33:31Z","body":"Benjamin has some CL in progress that could help with that."}}