{"action":"created","issue":{"url":"https://api.github.com/repos/TypeStrong/ts-loader/issues/393","repository_url":"https://api.github.com/repos/TypeStrong/ts-loader","labels_url":"https://api.github.com/repos/TypeStrong/ts-loader/issues/393/labels{/name}","comments_url":"https://api.github.com/repos/TypeStrong/ts-loader/issues/393/comments","events_url":"https://api.github.com/repos/TypeStrong/ts-loader/issues/393/events","html_url":"https://github.com/TypeStrong/ts-loader/issues/393","id":192450214,"number":393,"title":"Compilation significantly slower than TSC, and massive regression in 1.2.2?","user":{"login":"prencher","id":138147,"avatar_url":"https://avatars.githubusercontent.com/u/138147?v=3","gravatar_id":"","url":"https://api.github.com/users/prencher","html_url":"https://github.com/prencher","followers_url":"https://api.github.com/users/prencher/followers","following_url":"https://api.github.com/users/prencher/following{/other_user}","gists_url":"https://api.github.com/users/prencher/gists{/gist_id}","starred_url":"https://api.github.com/users/prencher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prencher/subscriptions","organizations_url":"https://api.github.com/users/prencher/orgs","repos_url":"https://api.github.com/users/prencher/repos","events_url":"https://api.github.com/users/prencher/events{/privacy}","received_events_url":"https://api.github.com/users/prencher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-30T01:25:16Z","updated_at":"2016-11-30T07:19:46Z","closed_at":null,"body":"With TypeScript 2.0.10's TSC, our compilation takes around 30 seconds, with an incremental time around 13 seconds, using the following configuration, and outputting individual files with source maps:\r\n```json\r\n{\r\n    \"compilerOptions\": {\r\n        \"experimentalDecorators\": true,\r\n        \"forceConsistentCasingInFileNames\": true,\r\n        \"isolatedModules\": true,\r\n        \"jsx\": \"react\",\r\n        \"lib\": [\"dom\", \"es2016\"],\r\n        \"module\": \"commonjs\",\r\n        \"moduleResolution\": \"node\",\r\n        \"noImplicitAny\": true,\r\n        \"sourceMap\": true,\r\n        \"suppressImplicitAnyIndexErrors\": true,\r\n        \"target\": \"es5\",\r\n        \"typeRoots\": [\r\n            \"./node_modules/@types\",\r\n            \"./typings\"\r\n        ]\r\n    },\r\n    \"exclude\": [\r\n        \"node_modules\"\r\n    ]\r\n}\r\n```\r\n\r\nHowever, when using ts-loader, the build takes around 70(!) seconds, with incrementals anywhere from 20-30 seconds.\r\n\r\nThat's bad enough, but with 1.2.2, it now takes around 98 seconds for both the initial compilation, and the incremental. \r\n\r\nFor reference, here's webpack configuration:\r\n```js\r\nconst webpack = require('webpack');\r\nconst packageJson = require('./package.json');\r\n\r\nmodule.exports = {\r\n    entry: {\r\n        app: './source/main.ts',\r\n        vendor: Object.keys(packageJson['dependencies']),\r\n    },\r\n    output: {\r\n        path: 'build',\r\n        filename: '[name].js'\r\n    },\r\n    devtool: 'source-map',\r\n    resolve: {\r\n        extensions: ['', '.js', '.ts', '.tsx', '.webpack.js', '.web.js'],\r\n    },\r\n    module: {\r\n        loaders: [\r\n            { loader: 'json-loader', test: /\\.json$/ },\r\n            { loader: 'ts-loader', test: /\\.tsx?$/, exclude: /node_modules/ },\r\n        ]\r\n    },\r\n    plugins: [\r\n        new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.js'),\r\n    ],\r\n};\r\n```\r\nThis is on Windows 10 using Node.js 6.9.1 and webpack 1.13.3.\r\n\r\nAny idea? I've been completely unable to determine why."},"comment":{"url":"https://api.github.com/repos/TypeStrong/ts-loader/issues/comments/263801414","html_url":"https://github.com/TypeStrong/ts-loader/issues/393#issuecomment-263801414","issue_url":"https://api.github.com/repos/TypeStrong/ts-loader/issues/393","id":263801414,"user":{"login":"prencher","id":138147,"avatar_url":"https://avatars.githubusercontent.com/u/138147?v=3","gravatar_id":"","url":"https://api.github.com/users/prencher","html_url":"https://github.com/prencher","followers_url":"https://api.github.com/users/prencher/followers","following_url":"https://api.github.com/users/prencher/following{/other_user}","gists_url":"https://api.github.com/users/prencher/gists{/gist_id}","starred_url":"https://api.github.com/users/prencher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prencher/subscriptions","organizations_url":"https://api.github.com/users/prencher/orgs","repos_url":"https://api.github.com/users/prencher/repos","events_url":"https://api.github.com/users/prencher/events{/privacy}","received_events_url":"https://api.github.com/users/prencher/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T07:19:46Z","updated_at":"2016-11-30T07:19:46Z","body":"Exactly 1.2.2 yes; The numbers above are for 1.2.1 and 1.2.2 respectively."}}
{"actor":{"display_login":"prencher"}}