-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(@ngtools/webpack): reduce rebuild performance by typechecking more #4258
Conversation
20ae390
to
6b26281
Compare
@@ -55,7 +55,7 @@ | |||
"ember-cli-string-utils": "^1.0.0", | |||
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this need to be changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge conflict, I'm reverting this.
@@ -23,3 +23,29 @@ export interface ResolverPlugin extends Tapable { | |||
join(relativePath: string, innerRequest: Request): Request; | |||
} | |||
|
|||
export interface LoaderCallback { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to use the existing Webpack typings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this also get reverse dependencies of reverse dependencies? e.g. index.ts
re-exporting classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was doing that, and forgot to put it back, my bad. Thanks for catching it!
@@ -130,7 +130,7 @@ | |||
"@types/fs-extra": "^0.0.31", | |||
"@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4.14.50
was pinned in #4260 recently merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).