ampproject / ampproject/amp-toolbox
[optimizer] Add static and runtime mode
- Dominant language
- HTML
- Stars
- 459
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
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 #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.
Contributor guide
Research direction
Start by reviewing the existing optimizer configuration and installation setup, along with issue #1180. Compare the runtime and build-time requirements, then define the two default modes and identify which dependencies can be optional. Done means both configurations are supported and non-essential dependencies are no longer required for installation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- build-system, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100