RE: Header Compression - streaming proposal

RUELLAN Herve <Herve.Ruellan@crf.canon.fr> Thu, 11 July 2013 16:28 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D920A21F9DBB for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 11 Jul 2013 09:28:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.017
X-Spam-Level:
X-Spam-Status: No, score=-10.017 tagged_above=-999 required=5 tests=[AWL=-0.068, BAYES_00=-2.599, HELO_EQ_FR=0.35, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ibm-MIMlO7Hc for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 11 Jul 2013 09:28:01 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 7F03921F9CF7 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 11 Jul 2013 09:27:41 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UxJhj-0002ow-52 for ietf-http-wg-dist@listhub.w3.org; Thu, 11 Jul 2013 16:26:51 +0000
Resent-Date: Thu, 11 Jul 2013 16:26:51 +0000
Resent-Message-Id: <E1UxJhj-0002ow-52@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <Herve.Ruellan@crf.canon.fr>) id 1UxJhb-0002nR-Q6 for ietf-http-wg@listhub.w3.org; Thu, 11 Jul 2013 16:26:43 +0000
Received: from inari-msr.crf.canon.fr ([194.2.158.67]) by lisa.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <Herve.Ruellan@crf.canon.fr>) id 1UxJha-00007N-Ip for ietf-http-wg@w3.org; Thu, 11 Jul 2013 16:26:43 +0000
Received: from mir-msr.corp.crf.canon.fr (mir-msr.corp.crf.canon.fr [172.19.77.98]) by inari-msr.crf.canon.fr (8.13.8/8.13.8) with ESMTP id r6BGQB09032332; Thu, 11 Jul 2013 18:26:11 +0200
Received: from ADELE.crf.canon.fr (adele.fesl2.crf.canon.fr [172.19.70.17]) by mir-msr.corp.crf.canon.fr (8.13.8/8.13.8) with ESMTP id r6BGQBAR007218; Thu, 11 Jul 2013 18:26:11 +0200
Received: from ADELE.crf.canon.fr ([::1]) by ADELE.crf.canon.fr ([::1]) with mapi id 14.02.0342.003; Thu, 11 Jul 2013 18:26:11 +0200
From: RUELLAN Herve <Herve.Ruellan@crf.canon.fr>
To: Martin Thomson <martin.thomson@gmail.com>, Gábor Molnár <gabor.molnar@sch.bme.hu>
CC: HTTP Working Group <ietf-http-wg@w3.org>
Thread-Topic: Header Compression - streaming proposal
Thread-Index: AQHOeSm+IN+RicmY50+HJV8bnVwNAZlVpdYAgACTUICABCSQgIADE5QAgACVPYCAAarxEA==
Date: Thu, 11 Jul 2013 16:26:09 +0000
Message-ID: <6C71876BDCCD01488E70A2399529D5E525EF0055@ADELE.crf.canon.fr>
References: <CA+KJw_5xfvnCYM7QmtLQebPDO-fJbZz6D47mjHEWui3=fiHUoQ@mail.gmail.com> <CA+KJw_4zqU7jdZNs9NpfA3HbjAcnhRLgMKG0Apf_nzyK9VrkHg@mail.gmail.com> <CABkgnnVqWjWrGWuP+eZniGJe+WWL7Ekt+88wJ8xO9tkHqzhNfA@mail.gmail.com> <CA+KJw_6W_J=cLP3AsVQK3GV-PuvM2MsDW7BVUeH=7=s_rk4gGw@mail.gmail.com> <CA+KJw_6Dfgr7AWVHtHbuphqveYOPKuD_R55QscYrrtsaa0XT5A@mail.gmail.com> <CABkgnnWshTMBc6v7jOgsreZ7wB7pK1ccnT_kYXbARJemD-GO4Q@mail.gmail.com>
In-Reply-To: <CABkgnnWshTMBc6v7jOgsreZ7wB7pK1ccnT_kYXbARJemD-GO4Q@mail.gmail.com>
Accept-Language: en-US, fr-FR
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [172.20.5.239]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Received-SPF: none client-ip=194.2.158.67; envelope-from=Herve.Ruellan@crf.canon.fr; helo=inari-msr.crf.canon.fr
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-3.235, RP_MATCHES_RCVD=-0.303
X-W3C-Scan-Sig: lisa.w3.org 1UxJha-00007N-Ip 2f28beaf4aa3b710463ec7d3510a7b1a
X-Original-To: ietf-http-wg@w3.org
Subject: RE: Header Compression - streaming proposal
Archived-At: <http://www.w3.org/mid/6C71876BDCCD01488E70A2399529D5E525EF0055@ADELE.crf.canon.fr>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/18694
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

I've been pondering on this proposal for some time.

I think it has several impact on the header compression mechanism.

1. The decoder can be much simpler. In particular, it can help avoiding nasty bugs due to the working set shadowing the index table.

2. It makes the encoder more complex. It think that the current spec allows for an encoder doing only one pass on the headers to encode, with the removed headers encoded at the end.
This new proposal enforce doing at least two pass on the headers to encode.

3. For performances, I will believe only when I see some numbers ;-).
The count of indexed entries will usually cost 8 bits. But 1 bit will be reclaimed on each entry, allowing to encoding larger index values on the first byte of each entry. I'm inclined to think this will result in a net gain, but I don't know how much.
However, if we decide to include typed codec, the reclaimed bit could be used as part of the signaling of which codec was used, and could decrease the cost of this inclusion.

Hervé.

> -----Original Message-----
> From: Martin Thomson [mailto:martin.thomson@gmail.com]
> Sent: mercredi 10 juillet 2013 18:48
> To: Gábor Molnár
> Cc: HTTP Working Group
> Subject: Re: Header Compression - streaming proposal
> 
> On 10 July 2013 00:53, Gábor Molnár <gabor.molnar@sch.bme.hu> wrote:
> > I opened an issue on GitHub for this proposal with minor modification
> > to the original text:
> > https://github.com/http2/compression-spec/issues/11
> >
> > If I get more feedback, I will be happy to draft a PR as well.
> 
> The only feedback I have is that you could reclaim a bit from each of the
> existing opcodes by doing this, which could produce a pretty big increase in
> performance.
> 
> Starting the header block with a count (the number of index entries, prefix
> size 0), could make this quite efficient.