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

transferSize and decodedSize attributes #5

Merged
merged 4 commits into from
Nov 13, 2014
Merged

transferSize and decodedSize attributes #5

merged 4 commits into from
Nov 13, 2014

Conversation

igrigorik
Copy link
Member

  • Adding two new attributes
  • Updated processing model to set both values

Closes #3. WG thread: http://lists.w3.org/Archives/Public/public-web-perf/2014Oct/0060.html

Based on discussion at TPAC:
- adding transferBodySize
- renaming decodedSize to decodedBodySize

Above change allows direct comparison between payload size for
before+after any content-codings are aplied (e.g. gzip). In addition to
above, transferSize provides a way to account for other protocol
overhead.
@igrigorik
Copy link
Member Author

@mnot can you sanity check proposed language in 9369559?

Also, I think we may need to refine our transferSize definition: https://rawgit.com/w3c/navigation-timing/size/index.html#dom-performancenavigationtiming-transfersize. Right now it says "response header fields + response message body", but I think we want to account for other overhead, like chunked coding, etc? Any suggestions for appropriate language?

@igrigorik
Copy link
Member Author

Err, just realized that in our meeting we said we wanted encodedBodySize, not transferBodySize... However, now that I think about it, perhaps transferBodySize is better, since the message body may not actually be "encoded"? :)

@mnot
Copy link
Member

mnot commented Nov 6, 2014

Is overhead included (e.g., chunking in /1, framing in /2)? If so, "transfer"; if not, "encoded."

@igrigorik
Copy link
Member Author

@mnot
Copy link
Member

mnot commented Nov 7, 2014

Do we need to say anything about redirects in transferSize?

Yes, I'm getting picky.

@igrigorik
Copy link
Member Author

@mnot personally, no... I think we should limit it to last request only.

That aside, any other thoughts or suggestions?

@mnot
Copy link
Member

mnot commented Nov 7, 2014

Should we explicitly say that we limit it to the last request only (i.e., previous messages aren't considered "overhead")? It feels like too much detail, but then again that's how bouncing baby bugs are born.

Anyway, LGTM.

@igrigorik
Copy link
Member Author

@mnot hmm, taking another pass over the spec, stumbled over...

(redirectStart) If there are HTTP redirects or equivalent when navigating and if all the redirects or equivalent are from the same origin, this attribute MUST return a DOMHighResTimeStamp with a time value equal to the starting time of the fetch that initiates the redirect. Otherwise, this attribute MUST return a DOMHighResTimeStamp with a time value equal to zero. - source

So, at least as long as the redirect is within same origin, we do account for its timing overhead. Now I'm wondering if we should do the same for HTTP overhead -- the consistency seems like a plus. Thoughts?

@igrigorik igrigorik merged commit fe25907 into gh-pages Nov 13, 2014
igrigorik added a commit to w3c/resource-timing that referenced this pull request Nov 13, 2014
mirrors attributes and spec language defined in NT:
w3c/navigation-timing#5
@plehegar plehegar deleted the size branch January 31, 2015 13:35
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.

transfer and resource size in Navigation + Resource Timing
2 participants