AMP

خارطة طريق مشروع AMP

The ongoing development of AMP is conducted in working groups, each with knowledge or interest in a specific area of AMP.

To make their work visible to the community all groups provide regular status updates with details of what they have accomplished and what's up next.

All of the updates listed here are available as issues on GitHub and we'd love you to join the conversation there!

Select working groups

Performance

Status Update Tue Jan 05 2021

What was accomplished

  • IntersectionObserver:
  • IntersectionObserver polyfill {root:document} support launched: https://github.com/w3c/IntersectionObserver/pull/465
  • Integration updated to select best one on a per-instance basis: https://github.com/ampproject/amphtml/pull/31453
  • E2E tests for documentHeight-based viewers (gmail): https://github.com/ampproject/amphtml/pull/31526
  • Removed polyfills from esm web-worker, cutting -0.3kb: https://github.com/ampproject/amphtml/pull/31494
  • Removed some usages of measuring APIs (https://github.com/ampproject/amphtml/pull/31693, https://github.com/ampproject/amphtml/pull/31730, https://github.com/ampproject/amphtml/pull/31753)
  • Holidays! 🎁

Lessons Learned

  • Can make empty commits via: git commit --allow-empty -m "Trigger Build"
All details on GitHub

What's Next

  • Continue removing usages of measuring APIs
  • Resume compiler research
All details on GitHub

Performance

Status Update Mon Dec 07 2020

What was accomplished

  • module build rollout is in 100%
  • Started privacy & legal reviews for adding CWV metrics from Google AMP cache to Page Experience tool
  • exclude iOS < 11 specifically from module build insertion

Lessons Learned

All details on GitHub

What's Next

  • fixes for double exec of module/nomodule in iOS < 11 in the runtime
  • Working on APIs for CWV metrics from Google AMP Cache
All details on GitHub

Performance

Status Update Mon Nov 23 2020

What was accomplished

  • Worked on TDD for adding AMP Cache CWV metrics to Page Experience Tool
  • mjs files now need to be approved when increased in size
  • build and upload esm tests when integration tests are modified

Lessons Learned

All details on GitHub

What's Next

  • Developing Page Experience Tool rule to ensure placeholder inside amp-img uses only data src (no network requests)
  • experiment design doc to have a hold over A/B test for module vs nomodule performance
  • Fix bug in Google AMP cache transformer where the document from origin already has module/nomodule pattern in markup
All details on GitHub

Performance

Status Update Mon Nov 09 2020

What was accomplished

  • Turn on esm tests in travis https://github.com/ampproject/amphtml/pull/28336
  • investigated A2HS support, but decided not to pursue further

Lessons Learned

All details on GitHub

What's Next

  • mjs tracking for bundle size bot
  • de-flake amp-user-notification tests
  • write document for SxG experiment methodology
  • ramp module/nomodule to 100%
  • investigating new rules for Pixi
All details on GitHub

Performance

Status Update Mon Oct 26 2020

What was accomplished

  • integration fixture files are now transformed through postHTML
  • safari fix for block scoping performance regression (can be 3x to 10x slower)
  • Investigated Firefox amp-sidebar FixedLayer bug, turned out to be testing setup misconfiguration (https://github.com/ampproject/amphtml/issues/30819)
  • Removing {BaseElement.viewportCallback}: 3 PRs currently in flight, as well as a few merged (https://github.com/ampproject/amphtml/pull/30647, https://github.com/ampproject/amphtml/pull/30802, https://github.com/ampproject/amphtml/pull/30859). One already merged (https://github.com/ampproject/amphtml/pull/30761)
  • Various test fixes, including aligning unit tests with prod-config: https://github.com/ampproject/amphtml/pull/30535

Lessons Learned

  • function definitions can be recursively redefined. (function f() { f = () => 5; return 7})
All details on GitHub

What's Next

  • esm to 100% (monitoring safari performance)
  • esm e2e tests
  • continue removing viewportCallback as well as associated code
  • research two Dynamic Mail bugs probably related to intersect-resources.
All details on GitHub

Performance

Status Update Mon Oct 12 2020

What was accomplished

  • fix esm ads performance/query tracking
  • make sure to opt-out control of LTS reporting
  • correctly cache busted control (this caused control to have higher cache hit rate as it was using production resources)
  • make performance-impl more robust in performanceobserver observe calls https://github.com/ampproject/amphtml/pull/30554

Lessons Learned

  • do not do a/b testing during the rollout phase and have a separate clean a/b testing environment
All details on GitHub

What's Next

  • esm from 50% to 100%
All details on GitHub

Performance

Status Update Mon Sep 28 2020

What was accomplished

  • Identified performance bottlenecks with amp.dev including inlined SVGs at top of body, unused CSS (https://github.com/ampproject/amp.dev/issues/4650), unnecessary layers (https://github.com/ampproject/amp.dev/issues/4665), and using custom carousel instead of amp-carousel (https://github.com/ampproject/amp.dev/issues/4670)
  • Started build-in-chunks experiment to improve FID (https://github.com/ampproject/amphtml/pull/30301)
  • support "mjs" in local/test server routes https://github.com/ampproject/amphtml/pull/30378
  • refactor postHTML transformers to support bad or implied localhost URL's (like relative paths) (https://github.com/ampproject/amphtml/pull/30292)
  • fix bug in module build for amp-ad's. Transfer the parent document's amp-runtime CSS into the amp-ad friendly iframe (https://github.com/ampproject/amphtml/pull/30257)

Lessons Learned

  • web.dev suggests a maximum of 1,500 DOM nodes per page
All details on GitHub

What's Next

  • Continue to identify FID & LCP issues affecting amp.dev (and large AMP sites)
  • allow for module/nomodule pattern in JavaScript validator (following c++ changes)
All details on GitHub

Performance

Status Update Mon Sep 14 2020

What was accomplished

  • fixed AMP deployment of worker-dom artifacts (https://github.com/ampproject/amphtml/pull/30141)
  • prototyped moving compilation of worker-dom to downstream repos. (https://github.com/ampproject/worker-dom/pull/937)
  • added amp-debug and amp-production binaries to worker-dom. (https://github.com/ampproject/worker-dom/pull/929)
  • prototyped adding content-visibility css automatically for valid AMP components.
  • created repo to test amp.dev performance and discovered svg issue causing slowdown

Lessons Learned

All details on GitHub

What's Next

  • visual diffs for module build
  • improve compatibility of worker-dom Element.innerHTML setter.
All details on GitHub

Performance

Status Update Mon Aug 31 2020

What was accomplished

  • Removed fine and info level logs from ESM build for additional runtime size reduction
  • tested modulepreload vs preload vs modulepreload + preload in tachometer (synthetic testing showing that there is no gain to using modulepreload in chrome)

Lessons Learned

All details on GitHub

What's Next

  • Figure out how to make amp.dev pass CWV
  • Study advanced closure optimizations/ global variable renaming (potential size reduction: 5kb)
  • Study removing user assertions & errors from ESM build for additional size reduction
  • add AMP "browsing stories" to chromium system health
  • add in memory object table to fix message extraction race condition on disk
All details on GitHub

Performance

Status Update Mon Aug 17 2020

What was accomplished

  • exclude LTS from module/nomodule rollout
  • added AMP "loading stories" to chromium system health
  • finished design doc on AMP Analytics vendor config inlining
  • Wrapped up work on the AMP packager for the SxG build
  • AMP Animations polyfill to lazyloading saving ~18KB for compliant browsers

Lessons Learned

All details on GitHub

What's Next

  • add AMP "browsing stories" to chromium system health
  • work on adding module/nomodule support for validator
  • make amp.dev pass CWV
  • Begin working on validator changes for the SxG build
All details on GitHub

Performance

Status Update Mon Aug 03 2020

What was accomplished

  • Merged ads experiment id's for module/nomodule
  • runtime type meta is temporarily inserted for module/nomodule ads experiments detection (ex. <meta name="runtime-type" value="${value}">
  • @xiexr151e added gulp coverage-map task. allows to evaluate code not ran during initialization

Lessons Learned

All details on GitHub

What's Next

  • evaluate gulp unit testing to align with module build
  • fixes/update to gulp coverage-map
All details on GitHub

Performance

Status Update Mon Jul 20 2020

What was accomplished

  • Add a way for the module/nomodule rollout to be able to identify its control branch. This gives us a path to report to the ads team
  • Did some preliminary work on reducing v0.js in the upcoming SxG build by enabling the experiment on fixed layer code

Lessons Learned

All details on GitHub

What's Next

  • Add reporting for rollout of module/nomodule as an ads experiment on client side
All details on GitHub

Performance

Status Update Mon Jul 06 2020

What was accomplished

  • Merged CSS insert logic for tests https://github.com/ampproject/amphtml/pull/28972
  • OpenJS/Web.dev conferences
  • Wrapped up server side cache transformation for inline amp-analytics vendor config
  • Fixed Transpilation of WorkerDOM impacting Element.classList.
  • Moved AMP to Graal Native Closure Compiler, increasing concurrency and dropping developer build times by ~2.5x.

Lessons Learned

  • Travis, Github, and CircleCI all use low core count machines for Continuous Integration.
All details on GitHub

What's Next

  • turn on transformers for all integration tests. unblock failing critical tests by skipping and assigning to individual working groups.
  • Runtime changes for using inlined amp-analytics vendor config
  • Efficiency improvements for Closure Compilation
  • Kris goes on paternity leave.
All details on GitHub

Performance

Status Update Mon Jun 22 2020

What was accomplished

  • integration tests html fixtures are now passed through a no op pipeline and outputted to test-bin at the root of the project https://github.com/ampproject/amphtml/pull/28864
  • @xiexr151e joined the AMP Performance team as an intern!
  • Removed Single Pass Pipeline.
  • Simplify Logic for rtv in client code.
  • Conformance checks for allowlist, denylist, and legacy enforced usage.
  • Remove Share Tracking

Lessons Learned

  • Github Actions works well for generating native binaries using Graal.
All details on GitHub

What's Next

  • add css append postHTML transformer https://github.com/ampproject/amphtml/pull/28972
  • turn on the transforms for fixtures when integration tests are ran for esm mode
  • Enable Custom AMP Runner pre-built native Closure Compiler, ~3x speedup in compilation.
  • Inline amp-analytics vendor config with cache transform (instead of fetching from server)
All details on GitHub

Performance

Status Update Tue May 26 2020

What was accomplished

  • add debug flag to gulp integration. This will allow developers to add "debugger" statements as well as setting breakpoints as it auto opens devtools during the integration run (only works in non headless mode)
  • Cleaned up FixedLayer issues and ready to merge and start experiment

Lessons Learned

All details on GitHub

What's Next

  • add HTML transformer to integration tests (part of making integration tests pass for --esm)
  • clean up and make AmpCodingConvention more generalized as part of proposal for submission to Closure Compiler team
  • Inline amp-ad config on Google AMP cache
  • Prepare for Performance Team intern!
All details on GitHub