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

I2I: Lazy load non-render blocking services #24188

Closed
15 tasks
lannka opened this issue Aug 23, 2019 · 3 comments
Closed
15 tasks

I2I: Lazy load non-render blocking services #24188

lannka opened this issue Aug 23, 2019 · 3 comments
Labels
INTENT TO IMPLEMENT Proposes implementation of a significant new feature. https://bit.ly/amp-contribute-code Stale Inactive for one year or more WG: performance WG: runtime

Comments

@lannka
Copy link
Contributor

lannka commented Aug 23, 2019

  • 18K installUrlReplacementsServiceForDoc(ampdoc);
  • 10K installActionServiceForDoc(ampdoc);
  • 8K installHistoryServiceForDoc(ampdoc);
  • 6K built-ins (amp-img, amp-pixel, amp-layout)
  • 5K installGlobalNavigationHandlerForDoc(ampdoc);
  • 4K installStandardActionsForDoc(ampdoc);
  • 4K install[Batched]XhrService(global);
  • 2K installGlobalSubmitListenerForDoc(ampdoc);
  • 2K installCryptoService(global);
  • 2K installTemplatesService(global);
  • 2K installInputService(global);
  • 2K iframeMessagingClient
  • 1K installAnchorClickInterceptor
  • 1K installDocumentInfoServiceForDoc(ampdoc);
  • 1K installHiddenObserverForDoc(ampdoc);

/cc @dvoytenko

@lannka lannka added INTENT TO IMPLEMENT Proposes implementation of a significant new feature. https://bit.ly/amp-contribute-code WG: monetization WG: runtime labels Aug 23, 2019
@lannka lannka self-assigned this Aug 23, 2019
@jpettitt
Copy link
Contributor

jpettitt commented Aug 23, 2019

Is this just inabox?

I think installUrlReplacementsServiceForDoc is in the critical path for amp-subscriptions and amp-access entitlements checks. Lazy load will delay the check which may lead to screen jank depending on where the publishers has put the cut between free and paid sections (IE is it in viewport). I'm not sure is this is going to be an issue in the real world.

@sparhami
Copy link

There is a FR for the performance WG along the same lines here: ampproject/wg-performance#17

The idea there would be to use knowledge of which extensions are present to use the lightweight binary, but if certain ones are present (e.g. amp-access), it would load the full runtime. This would be done as an optimization step, and would validate as transformed AMP. I think there is some discussion on variations of the runtime create rather than one light, one full. The lightweight one could async load services if they end up being necessary.

@lannka lannka removed their assignment Jan 28, 2020
@stale
Copy link

stale bot commented Jul 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Inactive for one year or more label Jul 22, 2021
@stale stale bot closed this as completed Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INTENT TO IMPLEMENT Proposes implementation of a significant new feature. https://bit.ly/amp-contribute-code Stale Inactive for one year or more WG: performance WG: runtime
Projects
None yet
Development

No branches or pull requests

3 participants