{"action":"created","issue":{"url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/issues/118","repository_url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader","labels_url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/issues/118/comments","events_url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/issues/118/events","html_url":"https://github.com/s-panferov/awesome-typescript-loader/issues/118","id":147150798,"number":118,"title":"Speed issues","user":{"login":"olmobrutall","id":720953,"avatar_url":"https://avatars.githubusercontent.com/u/720953?v=3","gravatar_id":"","url":"https://api.github.com/users/olmobrutall","html_url":"https://github.com/olmobrutall","followers_url":"https://api.github.com/users/olmobrutall/followers","following_url":"https://api.github.com/users/olmobrutall/following{/other_user}","gists_url":"https://api.github.com/users/olmobrutall/gists{/gist_id}","starred_url":"https://api.github.com/users/olmobrutall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olmobrutall/subscriptions","organizations_url":"https://api.github.com/users/olmobrutall/orgs","repos_url":"https://api.github.com/users/olmobrutall/repos","events_url":"https://api.github.com/users/olmobrutall/events{/privacy}","received_events_url":"https://api.github.com/users/olmobrutall/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2016-04-09T18:30:44Z","updated_at":"2016-04-24T17:11:29Z","closed_at":null,"body":"Hi @s-panferov and company, \r\n\r\nI've been struggling recently improving the build time of a mid-big application using typescript + react + webpack. \r\n\r\nThis are my main dependencies: \r\n\r\n```JS\r\nmodule.exports = {\r\n    entry: {\r\n        //main: [ \"./Scripts/Main.tsx\" ],\r\n        \"react\": [\"react\", \"react-bootstrap\", \"react-router\", \"react-widgets\", \"react-router-bootstrap\", \"moment\", \"numbro\"],\r\n        \"codemirror\": [\"codemirror\"],\r\n        \"d3\": [\"d3\"],\r\n    },\r\n    ....\r\n}\r\n````\r\n\r\n1. With `main` commented-out webpack takes only **3.9s** to compile the dependencies. \r\n2. Running `tsc  --outFile` takes **6s**  to compile and bundle my code. \r\n3. So I was expecting `ts-loader` and `awesome-typescript-loader` to take about **10s**.\r\n\r\nUnfortunately It takes between **30s** and **40s**, 3 or 4 times slower than expected. \r\n\r\nI've tried different possibilities, \r\n* like using `externals` and `noParse`-> no important changes\r\n* stop using `CommonsChunkPlugin`-> no important changes. \r\n* using `new webpack.optimize.LimitChunkCountPlugin({maxChunks: 15})`  -> about 8% slower.\r\n* removing all the async requires and make one big bundle, without code splitting -> about 10% faster. \r\n* using `awesome-typescript-loader` instead of `ts-loader` -> about 10% faster. \r\n* finally using 'ts-loader` with transpileOnly -> *about 80% faster* now it takes some reasonable * 12s* \r\n\r\nBut of course this is cheating since `ts-loader` is not doing the same work than tsc was doing.  \r\n\r\nFor now I will settle on this solution, since I'm compiling TS with noEmit on VisualStudio anyway (I prefer to get the errors there, so I can double-click on them), but I'm curious why webpack is fast, typescript is fast, but webpack + typescript is four times slower :S \r\n\r\nI repeated all the measures twice \r\n\r\n![image](https://cloud.githubusercontent.com/assets/720953/14405549/c8d179f6-fe91-11e5-8f2b-372827ce9347.png)\r\n"},"comment":{"url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/issues/comments/214002648","html_url":"https://github.com/s-panferov/awesome-typescript-loader/issues/118#issuecomment-214002648","issue_url":"https://api.github.com/repos/s-panferov/awesome-typescript-loader/issues/118","id":214002648,"user":{"login":"s-panferov","id":198327,"avatar_url":"https://avatars.githubusercontent.com/u/198327?v=3","gravatar_id":"","url":"https://api.github.com/users/s-panferov","html_url":"https://github.com/s-panferov","followers_url":"https://api.github.com/users/s-panferov/followers","following_url":"https://api.github.com/users/s-panferov/following{/other_user}","gists_url":"https://api.github.com/users/s-panferov/gists{/gist_id}","starred_url":"https://api.github.com/users/s-panferov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-panferov/subscriptions","organizations_url":"https://api.github.com/users/s-panferov/orgs","repos_url":"https://api.github.com/users/s-panferov/repos","events_url":"https://api.github.com/users/s-panferov/events{/privacy}","received_events_url":"https://api.github.com/users/s-panferov/received_events","type":"User","site_admin":false},"created_at":"2016-04-24T17:11:29Z","updated_at":"2016-04-24T17:11:29Z","body":"And the second question, what is your OS?"}}