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

Force AMP pages to always paint once before installing extensions. #8231

Merged
merged 5 commits into from Mar 20, 2017

Conversation

cramforce
Copy link
Member

This makes AMP draw roughly half way into the JS initialization which is quite significant perceptual speedup. This comes at

  • overall larger CPU usage (due to extra paint and more style recalc)
  • and overall slightly longer start up (since waiting for frames to pass by).

This makes AMP draw roughly half way into the JS initialization which is quite significant perceptual speedup. This comes at

- overall larger CPU usage (due to extra paint and more style recalc)
- and overall slightly longer start up (since waiting for frames to pass by).
@cramforce
Copy link
Member Author

cramforce commented Mar 17, 2017

screen shot 2017-03-17 at 3 14 46 pm

Screenshot showing how a frame is pumped while JS is still super busy.

Without the change

screen shot 2017-03-17 at 3 16 01 pm

@cramforce
Copy link
Member Author

PTAL. Added handling for extensions coming in while waiting on a frame and added tests.

…as we don't usually want to render early if these are present.
@cramforce
Copy link
Member Author

Added presence of render delaying services as a bailout condition, since we need them to run ASAP.

@ampprojectbot
Copy link
Member

Hi, ampproject bot here! Here are a list of the owners that can approve your files.

You may leave an issue comment stating "@ampprojectbot retry!" to force me to re-evaluate this Pull Request's status

/to cramforce dvoytenko jridgewell

  • tools/experiments/experiments.js

/to dvoytenko jridgewell

  • src/render-delaying-services.js
  • src/runtime.js

/to alanorozco camelburrito chenshay choumx cvializ ericlindley-g erwinmombay gregable honeybadgerdontcare jridgewell kmh287 lannka mkhatib mrjoro muxin newmuis powdercloud zhouyx

  • test/functional/test-render-delaying-services.js
  • test/functional/test-runtime.js

For any issues please file a bug at https://github.com/google/github-owners-bot/issues

@dvoytenko
Copy link
Contributor

LGTM

@cramforce cramforce changed the title RFC: Force AMP pages to always paint once before installing extensions. Force AMP pages to always paint once before installing extensions. Mar 20, 2017
@cramforce cramforce merged commit 592c905 into ampproject:master Mar 20, 2017
@cramforce cramforce deleted the benchmarking-march-2017 branch March 20, 2017 22:02
This was referenced Mar 21, 2017
mrjoro pushed a commit to mrjoro/amphtml that referenced this pull request Apr 28, 2017
…mpproject#8231)

This makes AMP draw roughly half way into the JS initialization which is quite significant perceptual speedup. This comes at

- overall larger CPU usage (due to extra paint and more style recalc)
- and overall slightly longer start up (since waiting for frames to pass by).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants