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

Create srcset in #layoutCallback #8361

Merged
merged 1 commit into from
Mar 24, 2017

Conversation

jridgewell
Copy link
Contributor

@jridgewell jridgewell commented Mar 24, 2017

Each srcset takes ~.2ms (for 2 possibles selections) to parse and
create. Moving this into #layoutCallback saves us from doing that when
we parse every image in the DOM.

Fixes #8359.

Each srcset takes ~.2ms (for 2 possibles selections) to parse and
create. Moving this into `#layoutCallback` saves us from doing that when
we parse _every_ image on the page.
@jridgewell jridgewell merged commit 0c1185f into ampproject:master Mar 24, 2017
@jridgewell jridgewell deleted the lazy-srcset branch March 24, 2017 02:07
mrjoro pushed a commit to mrjoro/amphtml that referenced this pull request Apr 28, 2017
Each srcset takes ~.2ms (for 2 possibles selections) to parse and
create. Moving this into `#layoutCallback` saves us from doing that when
we parse _every_ image on the page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants