Subject: Re: [quicwg/base-drafts] make payload length 0 special (#1301)

From: Lars Eggert <[email-masked]>
Date: Fri, 04 May 2018 18:48:12 +0000 (UTC)

I'm with @marten-seemann - I think this would be useful. When encoding, either you need to make the varint fixed-length (so you can encode it after laying out the packet), which wastes a byte, or you may need to occasionally `memmove`, or you need to pre-calculate the length of your frames, which wastes cycles.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1301#issuecomment-386698288

---

From: janaiyengar <[email-masked]>
Date: Fri, 04 May 2018 22:43:23 +0000 (UTC)

I agree with Lars's point that implementations that never coalesce will have to compute this. That is an unnecessary cost... and we expect the common case to be non-coalesced packets. In optimizing for the common case, I am in favor of this PR.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1301#issuecomment-386753276

---

From: Kazuho Oku <[email-masked]>
Date: Fri, 04 May 2018 23:09:29 +0000 (UTC)

@larseggert:
> I think this would be useful. When encoding, either you need to make the varint fixed-length (so you can encode it after laying out the packet), which can waste a byte, or you may need to occasionally memmove, or you need to pre-calculate the length of your frames, which wastes cycles. Plus, even implementations that will never coalesce packets will always need to do this, which seems backward.

While I can understand the argument, I do not think that the solution proposed by this PR is optimal.

In my view, the claim is that some implementations do not want to always spend 2 octets on expressing the payload length (note: you can express any payload size using a 2-octet varint expression).

If that is the case, why go for using 1 octet?

I would rather suggest having different packet types for packets that carry the payload length (e.g., Initial-with-Length, Handshake-with-Length) so that implementations not using coalesced packets wouldn't spend any extra octet, or keep the packet design as-is.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1301#issuecomment-386756993

---

From: Lars Eggert <[email-masked]>
Date: Sat, 05 May 2018 05:40:51 +0000 (UTC)

That’s fine too

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1301#issuecomment-386781389

---

From: janaiyengar <[email-masked]>
Date: Tue, 15 May 2018 15:40:53 -0700

@marten-seemann : Can you raise this on the list and discuss? We should move this conversation forward, but I don't think this PR is the place to discuss.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1301#issuecomment-389336574

---

From: Martin Thomson <[email-masked]>
Date: Mon, 28 May 2018 21:10:27 -0700

Closed #1301.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1301#event-1650166693

---

From: Martin Thomson <[email-masked]>
Date: Mon, 28 May 2018 21:10:26 -0700

Closing based on list feedback.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1301#issuecomment-392647402