{"action":"opened","issue":{"url":"https://api.github.com/repos/dart-lang/pub/issues/815","labels_url":"https://api.github.com/repos/dart-lang/pub/issues/815/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/pub/issues/815/comments","events_url":"https://api.github.com/repos/dart-lang/pub/issues/815/events","html_url":"https://github.com/dart-lang/pub/issues/815","id":85644835,"number":815,"title":"\"pub serve\" should lazily compile dart2js","user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/pub/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/dart-lang/pub/labels/Fixed","name":"Fixed","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/pub/labels/Pub-Serve","name":"Pub-Serve","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"nex3","id":188,"avatar_url":"https://avatars.githubusercontent.com/u/188?v=3","gravatar_id":"","url":"https://api.github.com/users/nex3","html_url":"https://github.com/nex3","followers_url":"https://api.github.com/users/nex3/followers","following_url":"https://api.github.com/users/nex3/following{/other_user}","gists_url":"https://api.github.com/users/nex3/gists{/gist_id}","starred_url":"https://api.github.com/users/nex3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nex3/subscriptions","organizations_url":"https://api.github.com/users/nex3/orgs","repos_url":"https://api.github.com/users/nex3/repos","events_url":"https://api.github.com/users/nex3/events{/privacy}","received_events_url":"https://api.github.com/users/nex3/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-06-05T22:15:29Z","updated_at":"2015-06-05T22:15:29Z","closed_at":null,"body":"<a href=\"https://github.com/nex3\"><img src=\"https://avatars.githubusercontent.com/u/188?v=3\" align=\"left\" width=\"96\" height=\"96\"hspace=\"10\"></img></a> **Issue by [nex3](https://github.com/nex3)**\n_Originally opened as dart-lang/sdk#16076_\n\n----\n\nCurrently, &quot;pub serve&quot; will compile dart2js for each Dart entrypoint it knows about. Issue dart-lang/pub#805 means that this will soon expand to include all tests and examples in an app. Since dart2js is currently quite slow, compiling all of these entrypoints in sequence will mean that the entrypoint the user is interested in will likely languish for a long time -- potentially tens of minutes for packages with many tests.\n\nUntil dart2js becomes much faster, the best way to deal with this is to only start compiling Dart entrypoints once they're requested. After that, they'll continue being recompiled as soon as the user edits an applicable source file."}}