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

Extend Optimizer with transformer for module/nomodule scripts (ESM) #20

Closed
westonruter opened this issue Apr 20, 2020 · 6 comments · Fixed by #119
Closed

Extend Optimizer with transformer for module/nomodule scripts (ESM) #20

westonruter opened this issue Apr 20, 2020 · 6 comments · Fixed by #119
Assignees
Labels
P0 High Priority Performance
Milestone

Comments

@westonruter
Copy link
Member

Feature description

See ampproject/amp-toolbox#722.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation brief

QA testing instructions

Demo

Changelog entry

@schlessera schlessera changed the title Extend Optimizer with transformer for module/nomodule scripts Extend Optimizer with transformer for module/nomodule scripts (ESM) Jul 21, 2020
@schlessera
Copy link
Collaborator

This work should also include preloading of critical modules, either within the same transformer or a separate one.

See https://developers.google.com/web/updates/2017/12/modulepreload

@schlessera schlessera transferred this issue from ampproject/amp-wp Nov 6, 2020
@schlessera schlessera added Optimizer: Transformer Performance Blocked Cannot be worked because of upstream reasons labels Nov 6, 2020
@schlessera
Copy link
Collaborator

The draft PR ampproject/amp-wp#5078 needs to be transferred over to this repository.

@kristoferbaxter
Copy link

Please note that the AMP Performance WG does not yet recommend the usage of modulepreload, but instead uses a correctly configured preload for the Google AMP Cache.

Would prefer this change does not use modulepreload and mirrors the functionality on the Google AMP Cache when module mode is enabled.

@westonruter westonruter removed the Blocked Cannot be worked because of upstream reasons label Feb 11, 2021
@westonruter westonruter added the P0 High Priority label Mar 30, 2021
@westonruter
Copy link
Member Author

Please note that the AMP Performance WG does not yet recommend the usage of modulepreload, but instead uses a correctly configured preload for the Google AMP Cache.

Note that modulepreload has been implemented as of ampproject/amp-toolbox#1161, but apparently only temporarily so.

@westonruter
Copy link
Member Author

@sebastianbenz Should we be going live in WP with preload or modulepreload?

@kristoferbaxter
Copy link

There was a recent regression in preload when used with module scripts in Chromium.

Engineers on the V8 team are working to address, and as a temporary measure we've elected to use modulepreload on the Google AMP Cache. This carries a downside, as Safari will not process these directives.

Until this is resolved, modulepreload is the best of the bad options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High Priority Performance
Projects
None yet
3 participants