Ensure that viewer handshake always happens quickly.#6765
Merged
cramforce merged 5 commits intoampproject:masterfrom Dec 21, 2016
Merged
Ensure that viewer handshake always happens quickly.#6765cramforce merged 5 commits intoampproject:masterfrom
cramforce merged 5 commits intoampproject:masterfrom
Conversation
erwinmombay
reviewed
Dec 20, 2016
| } | ||
| }); | ||
| }; | ||
| if (typeof fnOrStruct == 'function' || fnOrStruct.p == 'high') { |
Member
There was a problem hiding this comment.
can you leave a comment about the the .p and how it is set
Member
Author
There was a problem hiding this comment.
It is in the typedef, but will enhance the comment.
This fixes ampproject#6728. THe problem was that chunking can delay the handshake with the viewer for a very long time. During this time the viewer cannot tell the doc that it is now visible–and visibility triggers chunking to go into fast mode. With this change the aggressive chunking mode is only triggered when the doc has gotten into a state where it can communicate with the viewer; and the viewer communication code itself is never delayed in a chunk.
ee3441a to
25a2296
Compare
jridgewell
reviewed
Dec 21, 2016
| var e = extensions[key]; | ||
| buildExtension(e.name, e.version, e.hasCss, options, e.extraGlobs); | ||
| var o = Object.assign({}, options); | ||
| o = Object.assign(o, e); |
Contributor
There was a problem hiding this comment.
Why the double assign? var o = Object.assign({}, options, e)
Member
Author
There was a problem hiding this comment.
Mostly though nesting assigns is kind of unreadable. Happy to change.
dvoytenko
approved these changes
Dec 21, 2016
Contributor
dvoytenko
left a comment
There was a problem hiding this comment.
All good on my side. Just one small request.
| }); | ||
| }; | ||
| if (typeof fnOrStruct == 'function' || fnOrStruct.p == 'high') { | ||
| // "High priority" extensions do not go through chunking. |
Contributor
There was a problem hiding this comment.
Please make a note why function is considered "high" priority.
Lith
pushed a commit
to Lith/amphtml
that referenced
this pull request
Dec 22, 2016
This fixes ampproject#6728. THe problem was that chunking can delay the handshake with the viewer for a very long time. During this time the viewer cannot tell the doc that it is now visible–and visibility triggers chunking to go into fast mode. With this change the aggressive chunking mode is only triggered when the doc has gotten into a state where it can communicate with the viewer; and the viewer communication code itself is never delayed in a chunk.
Lith
pushed a commit
to Lith/amphtml
that referenced
this pull request
Dec 22, 2016
This fixes ampproject#6728. THe problem was that chunking can delay the handshake with the viewer for a very long time. During this time the viewer cannot tell the doc that it is now visible–and visibility triggers chunking to go into fast mode. With this change the aggressive chunking mode is only triggered when the doc has gotten into a state where it can communicate with the viewer; and the viewer communication code itself is never delayed in a chunk.
torch2424
pushed a commit
to torch2424/amphtml
that referenced
this pull request
Jan 3, 2017
This fixes ampproject#6728. THe problem was that chunking can delay the handshake with the viewer for a very long time. During this time the viewer cannot tell the doc that it is now visible–and visibility triggers chunking to go into fast mode. With this change the aggressive chunking mode is only triggered when the doc has gotten into a state where it can communicate with the viewer; and the viewer communication code itself is never delayed in a chunk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #6728. THe problem was that chunking can delay the handshake with the viewer for a very long time. During this time the viewer cannot tell the doc that it is now visible–and visibility triggers chunking to go into fast mode. With this change the aggressive chunking mode is only triggered when the doc has gotten into a state where it can communicate with the viewer; and the viewer communication code itself is never delayed in a chunk.