-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Alternative production code generation for AMP based on the closure compiler #1218
Conversation
cramforce
commented
Dec 22, 2015
- Currently a 15K win on main binary and likely much faster initial JS compilation due to simpler code.
- Includes a compiled compiler binary while we wait for a patch to land that is needed to compiler core-js.
- Doesn't yet activate (and benefit in code size) from type checking.
@@ -434,7 +434,7 @@ export class Viewer { | |||
* @param {boolean} awaitResponse | |||
* @return {(!Promise<*>|undefined)} | |||
* @package | |||
* @export | |||
* _export |
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.
We do manual exports practically for everything else. So, we could do the same here.
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.
There is no magic here anyway. For a long time we won't be able to run with property obfuscation anyway.
4f50961
to
bc388c8
Compare
@erwinmombay I ported this based on your change to use gulp for the compiler invocation. And bundled a compiled compiler that has my patch with the PR. The nice thing: The generated code actually works :) Makes compiled code 15KB smaller. 3KB after GZip. This is with simple optimizations only. |
@cramforce thats awesome to hear! |
@erwinmombay Updated version. Major win: I was able to get rid of listing the core-js files individually. Had to set a flag that was also otherwise important :) I think we should submit this and then work from there to transform the rest of the code gen. |
- Currently a 15K win on main binary and likely much faster initial JS compilation due to simpler code. - Includes a compiled compiler binary while we wait for a patch to land that is needed to compiler core-js. - Doesn't yet activate (and benefit in code size) from type checking.
@cramforce LGTM. |
Alternative production code generation for AMP based on the closure compiler