{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/4328","labels_url":"https://api.github.com/repos/angular/angular/issues/4328/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/4328/comments","events_url":"https://api.github.com/repos/angular/angular/issues/4328/events","html_url":"https://github.com/angular/angular/issues/4328","id":107842188,"number":4328,"title":"Need a solution to speed up Angular2!!","user":{"login":"butaixianran","id":5558722,"avatar_url":"https://avatars.githubusercontent.com/u/5558722?v=3","gravatar_id":"","url":"https://api.github.com/users/butaixianran","html_url":"https://github.com/butaixianran","followers_url":"https://api.github.com/users/butaixianran/followers","following_url":"https://api.github.com/users/butaixianran/following{/other_user}","gists_url":"https://api.github.com/users/butaixianran/gists{/gist_id}","starred_url":"https://api.github.com/users/butaixianran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/butaixianran/subscriptions","organizations_url":"https://api.github.com/users/butaixianran/orgs","repos_url":"https://api.github.com/users/butaixianran/repos","events_url":"https://api.github.com/users/butaixianran/events{/privacy}","received_events_url":"https://api.github.com/users/butaixianran/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-23T03:16:20Z","updated_at":"2015-09-23T11:20:43Z","closed_at":null,"body":"Angular 2 is really wonderful in many ways, but A BIG problem is: It's tooo slow when you open an Angular 2 page for the first time.\r\n\r\nHere is an example: (in Chinese)\r\nhttps://771dian.com/danmu\r\n\r\n![2015-09-23 11-10-03](https://cloud.githubusercontent.com/assets/5558722/10037119/35722218-61e4-11e5-8e5b-b9bb910466aa.jpg)\r\n\r\n\r\nThis simple page includes nearly 20 angular2 components, each one with a .js file and a html template.\r\n\r\nWhich means, when somebody open this simple page, server need to send more then 40 files to client, including angular.js, system.js and traceur-runtime.js.\r\n\r\nThat's really too many files even with SPDY or HTTP/2.\r\n\r\nThe example site above is using SPDY, but I still need to wait for a long time before chrome shows anything.\r\n(By the way, for the server side, I'm using node.js with KOA web framework, which should be fast.)\r\n\r\nAnd think about an index page for a CMS, it's gonna be more than 50 components for a single page, which means when you open that page, server need to send more than 100 files to client.\r\n\r\nIs there a solution for this \"too many files problem\"? Thanks.\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/142571855","html_url":"https://github.com/angular/angular/issues/4328#issuecomment-142571855","issue_url":"https://api.github.com/repos/angular/angular/issues/4328","id":142571855,"user":{"login":"S-YOU","id":1001175,"avatar_url":"https://avatars.githubusercontent.com/u/1001175?v=3","gravatar_id":"","url":"https://api.github.com/users/S-YOU","html_url":"https://github.com/S-YOU","followers_url":"https://api.github.com/users/S-YOU/followers","following_url":"https://api.github.com/users/S-YOU/following{/other_user}","gists_url":"https://api.github.com/users/S-YOU/gists{/gist_id}","starred_url":"https://api.github.com/users/S-YOU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/S-YOU/subscriptions","organizations_url":"https://api.github.com/users/S-YOU/orgs","repos_url":"https://api.github.com/users/S-YOU/repos","events_url":"https://api.github.com/users/S-YOU/events{/privacy}","received_events_url":"https://api.github.com/users/S-YOU/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T11:20:43Z","updated_at":"2015-09-23T11:20:43Z","body":"your server is just slow, it took 10s to download angular2.dev.js. (non-minified, no gzip)\r\n\r\n![2015-09-23 20 16 06](https://cloud.githubusercontent.com/assets/1001175/10043684/fdab4390-622f-11e5-9585-c5bcd836e3df.png)\r\n\r\nwhile google cdn can serve it around 100ms for angular 1x (non-minified, with gzip)\r\n![2015-09-23 20 18 15](https://cloud.githubusercontent.com/assets/1001175/10043731/4efc73ae-6230-11e5-98f9-8d80e0331e5d.png)\r\n\r\nwhat you can do is concat, minify, gzip etc as other said.\r\n"}}