Re: [dispatch] draft-devault-bare-07 to be discussed during IETF 114

Jiri Vlasak <jiri.hubacek@gmail.com> Wed, 27 July 2022 08:45 UTC

Return-Path: <jiri.hubacek@gmail.com>
X-Original-To: dispatch@ietfa.amsl.com
Delivered-To: dispatch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B5369C16ED18 for <dispatch@ietfa.amsl.com>; Wed, 27 Jul 2022 01:45:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.108
X-Spam-Level:
X-Spam-Status: No, score=-7.108 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pCn9eW-a67Qw for <dispatch@ietfa.amsl.com>; Wed, 27 Jul 2022 01:45:08 -0700 (PDT)
Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A703DC15A72B for <dispatch@ietf.org>; Wed, 27 Jul 2022 01:45:08 -0700 (PDT)
Received: by mail-ed1-x52d.google.com with SMTP id o13so5560158edc.0 for <dispatch@ietf.org>; Wed, 27 Jul 2022 01:45:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=KgU58FzKMNET2bmhLy+aCnUt69F/J03Yht8CcYIIU0c=; b=FfX5x+9NkcT2KZo1Nh7lYucYAxXbdW8ivzK/Wxih4Ag+pzuLFM6B+tX3Sb0+6HQJ+s 89EixiG+R49rLIHeRLe/eJgFg0S5fJ3GnXkqx1H+8AE2QWI0IrnOkXv6NHH9Idujw5V0 JGk6b6F2G7ocynD16DU0Cu4S9hgmD1G+8z6Rrn8pC2QzBS1uvat4g8c6YMb0Uu7VjaF4 P1wCY3ZAJNLiGXDNpzkDq4I1kBGgt64x/cpya+6JrXRaBm4nh/uxcfx+DrVyE/wzVQ5Y UBrQlTDqu1OmeHKEOlW3VEZydfziwdFTCrXrwcv5sjgFRZNP+6fd8aSbvZUZ+Apki+At DMQg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=KgU58FzKMNET2bmhLy+aCnUt69F/J03Yht8CcYIIU0c=; b=sxirzVQ9pifTLlvKUuDhaWRY74Vc/oFXjK9iPJz76oETVLx5JhIfR+6gzfHFJdrep5 JJRdugKLUo2WUTvxhrdVmA4GFdWFjBZggkRQwsvGRN2hz/HYIqfaSgaiI2OALD4RvKGr Vi5Y+P6RzAoMYojHvWGYMT1EeK31hJY4/U/c04PlYOZXy1otay4fW+A735xxGiY2iQ8u q5294GEaIdEUvFIqTikk+OLwe8gtdbowrYPtmBtKOHX0uiipD6wlC6X4YLi0t6wKY1D5 HB6LVjDMak6+osDpP5kPwGV+D0agkqTQX5XxmmYmZ11BrcapFkxFSutdj0sSxWhIX2qU FdGg==
X-Gm-Message-State: AJIora82YFNXSdBbn4BSw5Cj8H7LYndplYuLZwwK0h3FsVxyri9f6029 fBkfNtcrQP9OeRCwc4SNYJTmhcUYhzw=
X-Google-Smtp-Source: AGRyM1tBtw05HM84NFpgW7LxVTL9hW/PR89WfkJORobVPAGqgsYX17txgc/jNquzmmxbil/xXj/b2A==
X-Received: by 2002:a05:6402:388e:b0:43a:d5ff:60f0 with SMTP id fd14-20020a056402388e00b0043ad5ff60f0mr21548036edb.152.1658911506502; Wed, 27 Jul 2022 01:45:06 -0700 (PDT)
Received: from cvut.cz (fw3.ciirc.cvut.cz. [147.32.71.8]) by smtp.gmail.com with ESMTPSA id fi22-20020a056402551600b0043bd2a79311sm7916451edb.37.2022.07.27.01.45.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 01:45:05 -0700 (PDT)
Date: Wed, 27 Jul 2022 10:45:03 +0200
From: Jiri Vlasak <jiri.hubacek@gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
Cc: John Levine <johnl@taugh.com>, DISPATCH <dispatch@ietf.org>
Message-ID: <YuD7D479QwGCgdA1@cvut.cz>
Mail-Followup-To: Eric Rescorla <ekr@rtfm.com>, John Levine <johnl@taugh.com>, DISPATCH <dispatch@ietf.org>
References: <YqC0MHD7MPpcFEuc@cvut.cz> <20220608210551.72EB94341C93@ary.qy> <YqH16YukCzEbLBF3@cvut.cz> <CABcZeBNBSt0z7ur7_JwhBs30s05wT9n4jsDZA1wre991fkvS8w@mail.gmail.com> <YqJUjF8W3Dw/XgKB@gmail.com> <CABcZeBPRkW1iHVDVG4fLTdGzigfFtNLQDu_UkRHE1-V7jXgKrA@mail.gmail.com> <YqXbraM9m8PSag5V@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <YqXbraM9m8PSag5V@gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/dispatch/Z86e75o61BT0KTuNNJUvSk6Nw4Y>
Subject: Re: [dispatch] draft-devault-bare-07 to be discussed during IETF 114
X-BeenThere: dispatch@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: DISPATCH Working Group Mail List <dispatch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dispatch>, <mailto:dispatch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dispatch/>
List-Post: <mailto:dispatch@ietf.org>
List-Help: <mailto:dispatch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dispatch>, <mailto:dispatch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 27 Jul 2022 08:45:12 -0000

> Here is the script:
> 
> https://git.sr.ht/~qeef/draft-devault-bare/tree/master/item/compare-bare-to-cbor.py
> 
> I would appreciate if someone can check the script and provide a
> feedback. I am going to fix the issues found.
> 
> The results for the list of 1,000 messages, where each message (inspired
> by the Appendix B. Example Company of the BARE I-D) contains "someone"
> with "name", "email", "address" (list of four strings), and "orders"
> (list of 10 to 100 orders, where an order has i64 "orderId" and i32
> "quantity"), are:
> 
> 	For 1,000 messages:
> 	- Raw length, i.e. 100 % [Bytes]: 747933
> 	- BARE length [%]: 100.94
> 	- CBOR length [%]: 200.43
> 	- JSON length [%]: 325.60
> 	- BARE gzipped [%]: 26.57
> 	- CBOR gzipped [%]: 29.28
> 	- JSON gzipped [%]: 32.29

I have revised the script [1] and the CBOR results look better now.
Thanks again for pointing me out during the presentation. Still, there
is CBOR overhead needed to self-describe messages.

	For 1,000 messages:
	- Raw length, i.e. 100 % [Bytes]: 711866
	- BARE length [%]: 100.98
	- CBOR length [%]: 125.21
	- JSON length [%]: 324.88
	- BARE gzipped [%]: 26.54
	- CBOR gzipped [%]: 27.79
	- JSON gzipped [%]: 32.14

Please, note that I am using cbor2 Python package [2] I am not
affiliated with.

[1]: https://git.sr.ht/~qeef/draft-devault-bare/commit/9b62b99a2a6e7b5ff77369857b93a2a665640579
[2]: https://pypi.org/project/cbor2/