Skip to content
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

Make dep-check an order of magnitude faster. #20050

Merged
merged 3 commits into from Dec 21, 2018

Conversation

cramforce
Copy link
Member

Runtime goes down from over 4 minutes to 20 seconds.

Change: Instead of processing every entry point by itself, create a temporary file that imports all entry points and process that.

Runtime goes down from over 4 minutes to 20 seconds.

Change: Instead of processing every entry point by itself, create a temporary file that imports all entry points and process that.
Copy link
Contributor

@rsimha rsimha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Single pass dep-check :)

@@ -195,7 +203,9 @@ function getGraph(entryModule) {
.pipe(source(entryModule))
// Unfortunately we need to write the files out.
.pipe(gulp.dest('./.amp-build'))
.on('end', resolve.bind(null, module));
.on('end', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the change here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just personal preference in readability

@cramforce cramforce merged commit 871fd56 into ampproject:master Dec 21, 2018
@cramforce cramforce deleted the dep-perf branch December 21, 2018 21:23
noranazmy pushed a commit to noranazmy/amphtml that referenced this pull request Mar 22, 2019
Runtime goes down from over 4 minutes to 20 seconds.

Change: Instead of processing every entry point by itself, create a temporary file that imports all entry points and process that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants