perf(@ngtools/webpack): reduce rebuild performance by typechecking more#4258
Conversation
20ae390 to
6b26281
Compare
| "enhanced-resolve": "^2.3.0", | ||
| "exists-sync": "0.0.3", | ||
| "extract-text-webpack-plugin": "^2.0.0-rc.1", | ||
| "extract-text-webpack-plugin": "^2.0.0-beta.5", |
There was a problem hiding this comment.
Why does this need to be changed?
There was a problem hiding this comment.
Merge conflict, I'm reverting this.
| join(relativePath: string, innerRequest: Request): Request; | ||
| } | ||
|
|
||
| export interface LoaderCallback { |
There was a problem hiding this comment.
Wouldn't it be better to use the existing Webpack typings?
There was a problem hiding this comment.
The @types/webpack package? It's super incomplete and fits more for using webpack than developing a plugin. I'm still looking for a good webpack typings from the webpack team itself.
| if (!plugin.firstRun) { | ||
| this._module.reasons | ||
| .filter(reason => reason.module && reason.module instanceof NormalModule) | ||
| .forEach(reason => plugin.diagnose(reason.module.resource)); |
There was a problem hiding this comment.
Will this also get reverse dependencies of reverse dependencies? e.g. index.ts re-exporting classes.
There was a problem hiding this comment.
Yeah I was doing that, and forgot to put it back, my bad. Thanks for catching it!
| "@types/glob": "^5.0.29", | ||
| "@types/jasmine": "^2.2.32", | ||
| "@types/lodash": "4.14.50", | ||
| "@types/lodash": "4.14.43", |
There was a problem hiding this comment.
4.14.50 was pinned in #4260 recently merged
There was a problem hiding this comment.
Done. that was a merge conflict.
6b26281 to
f141cef
Compare
We got the TypeScript performance down a lot by not type checking every files on rebuild, but this has an issue where typings can be wrong in files that depends on us. This PR alleviate the problem by type checking all files that depends on the changed file. Note that even if this PR reduces performance, we're still ~40% faster than Beta.26.
f141cef to
761545e
Compare
…re (angular#4258) We got the TypeScript performance down a lot by not type checking every files on rebuild, but this has an issue where typings can be wrong in files that depends on us. This PR alleviate the problem by type checking all files that depends on the changed file. Note that even if this PR reduces performance, we're still ~40% faster than Beta.26.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
We got the TypeScript performance down a lot by not type checking every files on rebuild, but this has an issue where typings can be wrong in files that depends on us. This PR alleviate the problem by type checking all files that depends on the changed file.
Note that even if this PR reduces performance, it's marginal by less than 5% (although it depends on the depth of the change in the dependency graph).