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

Use Java version of Google Closure Compiler #12800

Merged
merged 13 commits into from
May 14, 2018
Merged

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented May 14, 2018

This was actually done by @trueadm, I just did a minor cleanup on top while he's away from keyboard.

The JS version of GCC is already too slow, and its memory usage is getting worse as we throw more inlinable code at it. Without this change, we can't land #12792 (7% prod build size reduction) because it eats over 16GB of RAM and never completes. For comparison, the Java version memory use peaks under 300 MB and completes in a few seconds. Luckily it's nicely packaged under a launcher distributed on npm so it's not a pain to integrate.

This change, however, means you can't yarn build without Java installed. I can imagine this being annoying for open source contributors. I don't see better options though.

@gaearon gaearon requested a review from bvaughn May 14, 2018 16:32
Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

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

I skimmed over the CircleCI and AppVeyor parts b'c I don't know about them. But overall this looks okay. 😄 Exciting speed and memory gains.

@@ -473,7 +473,7 @@ function handleRollupError(error) {
highlightCode: true,
});
console.error(frame);
} else {
} else if (error.codeFrame) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add an else here with something (e.g. "Unknown error")?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We already print the error message itself earlier so these are additive.

@gaearon
Copy link
Collaborator Author

gaearon commented May 14, 2018

CircleCI part works (I tested), as for AppVeyor we'll have to see because it only runs on master.

@gaearon gaearon merged commit 7254203 into facebook:master May 14, 2018
@sophiebits
Copy link
Collaborator

Should we file a bug with Closure?

@gaearon
Copy link
Collaborator Author

gaearon commented May 14, 2018

Nah, they're aware JS version is vastly inferior and were actually surprised it was usable to us. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants