{"action":"created","issue":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/4536","labels_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/4536/labels{/name}","comments_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/4536/comments","events_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/4536/events","html_url":"https://github.com/ember-cli/ember-cli/pull/4536","id":97836255,"number":4536,"title":"Remove unnecessary `\"use strict\";`s in \"app.js\"","user":{"login":"nathanhammond","id":20542,"avatar_url":"https://avatars.githubusercontent.com/u/20542?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanhammond","html_url":"https://github.com/nathanhammond","followers_url":"https://api.github.com/users/nathanhammond/followers","following_url":"https://api.github.com/users/nathanhammond/following{/other_user}","gists_url":"https://api.github.com/users/nathanhammond/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanhammond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanhammond/subscriptions","organizations_url":"https://api.github.com/users/nathanhammond/orgs","repos_url":"https://api.github.com/users/nathanhammond/repos","events_url":"https://api.github.com/users/nathanhammond/events{/privacy}","received_events_url":"https://api.github.com/users/nathanhammond/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-29T01:33:56Z","updated_at":"2015-07-29T02:29:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ember-cli/ember-cli/pulls/4536","html_url":"https://github.com/ember-cli/ember-cli/pull/4536","diff_url":"https://github.com/ember-cli/ember-cli/pull/4536.diff","patch_url":"https://github.com/ember-cli/ember-cli/pull/4536.patch"},"body":"When using ember-cli it is understood that all code in \"app.js\" is strict by default. If we add `\"use strict\";` in app-prefix.js as the very first statement then Uglify is clever enough to remove all of the other generated `\"use strict\";`s throughout app.js. In my app this results in ~33kb on-disk savings.\r\n\r\nThis should be the default behavior."},"comment":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/comments/125813658","html_url":"https://github.com/ember-cli/ember-cli/pull/4536#issuecomment-125813658","issue_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/4536","id":125813658,"user":{"login":"stefanpenner","id":1377,"avatar_url":"https://avatars.githubusercontent.com/u/1377?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanpenner","html_url":"https://github.com/stefanpenner","followers_url":"https://api.github.com/users/stefanpenner/followers","following_url":"https://api.github.com/users/stefanpenner/following{/other_user}","gists_url":"https://api.github.com/users/stefanpenner/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanpenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanpenner/subscriptions","organizations_url":"https://api.github.com/users/stefanpenner/orgs","repos_url":"https://api.github.com/users/stefanpenner/repos","events_url":"https://api.github.com/users/stefanpenner/events{/privacy}","received_events_url":"https://api.github.com/users/stefanpenner/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T02:29:49Z","updated_at":"2015-07-29T02:29:49Z","body":"> and 2604 statements that the JS parser doesn't have to deal with: 2604 * 13 bytes / 1024 = 33.05 kilobytes.\r\n\r\nits worth noting the following:\r\n\r\n* this saves us no packets (thanks to gzip)\r\n* amounts to likely less then 0.01% of all tokens the parser encounters.\r\n* the JS runtime will intern them to a single shared entry in memory\r\n\r\nIf this still seems like something worth while I can merge.\r\n\r\nPlease note, for those interested in this sort of optimization, the following PR (when complicated) will yield many of orders of magnitude more improvements https://github.com/emberjs/ember.js/pull/11576"}}