{"action":"created","issue":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/1707","repository_url":"https://api.github.com/repos/jspm/jspm-cli","labels_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1707/labels{/name}","comments_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1707/comments","events_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1707/events","html_url":"https://github.com/jspm/jspm-cli/issues/1707","id":147423772,"number":1707,"title":"Duplicate files being injected","user":{"login":"kdex","id":4442505,"avatar_url":"https://avatars.githubusercontent.com/u/4442505?v=3","gravatar_id":"","url":"https://api.github.com/users/kdex","html_url":"https://github.com/kdex","followers_url":"https://api.github.com/users/kdex/followers","following_url":"https://api.github.com/users/kdex/following{/other_user}","gists_url":"https://api.github.com/users/kdex/gists{/gist_id}","starred_url":"https://api.github.com/users/kdex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdex/subscriptions","organizations_url":"https://api.github.com/users/kdex/orgs","repos_url":"https://api.github.com/users/kdex/repos","events_url":"https://api.github.com/users/kdex/events{/privacy}","received_events_url":"https://api.github.com/users/kdex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-04-11T13:17:13Z","updated_at":"2016-04-22T16:22:24Z","closed_at":"2016-04-21T22:27:46Z","body":"In #872, see [these](https://github.com/jspm/jspm-cli/issues/872#issuecomment-208313034) measurements and the following three comments for more information.\r\n\r\nAlso, see @zakdances's description starting [here](https://github.com/jspm/jspm-cli/issues/872#issuecomment-207801965)."},"comment":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/comments/213497471","html_url":"https://github.com/jspm/jspm-cli/issues/1707#issuecomment-213497471","issue_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1707","id":213497471,"user":{"login":"guybedford","id":598730,"avatar_url":"https://avatars.githubusercontent.com/u/598730?v=3","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T16:22:24Z","updated_at":"2016-04-22T16:22:24Z","body":"Bundles are parsed when executed, but the inner initialisation code is not run until the System.import statement. So what you're measuring there is the linking time + the execution time of the app. One way to measure the execution time on its own is to use the bundle-sfx instead of a normal bundle and run that directly to see how long it takes to execute after parsing, which might be quite interesting to see.\r\n\r\nFor a 1.6MB code file, the execution time is really about how that code is written. Anything from 100ms to 400ms would be reasonable here, but over a second is certainly not ideal. This is not SystemJS specific though, it's about the init code itself.\r\n\r\nThe linking time is what SystemJS contributes though, and that is the normalization time + the loader pipeline time. One way of speeding this up may be to try using Bluebird for promises over native promises. This is certainly the key area where performance improvements in SystemJS in future can reduce this time. If you're able to work out what this time is in your app it would certainly be interesting to know."}}