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

[optimizer] Add static and runtime mode #1183

Open
sebastianbenz opened this issue Mar 29, 2021 · 0 comments
Open

[optimizer] Add static and runtime mode #1183

sebastianbenz opened this issue Mar 29, 2021 · 0 comments

Comments

@sebastianbenz
Copy link
Collaborator

AMP Optimizer usually runs either at build time or at runtime. Both modes have very different constraints in regards to execution time:

  1. Runtime: AMP Optimizer is executed in the critical rendering path requiring minimal execution times.
  2. Build time: AMP Optimizer is used at build time (e.g. for static sites). In this case, execution time is less critical enabling more expensive optimizations.

Steps we should take to better support this:

  1. Provide two different out-of-the box configurations for runtime and build time usage (see Add minimal Optimizer Transformer Config #1180 for a start). The runtime config should only perform AMP specific server-side optimizations, but avoid any expensive optimizations such as minification.
  2. Improve default install times by making all non-essential dependencies (cssnano-simple, postcss, terser) optional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant