Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0A443102B4 for ; Fri, 16 Aug 2013 09:33:28 +0000 (UTC) Received: (qmail 52174 invoked by uid 500); 16 Aug 2013 09:33:24 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 52082 invoked by uid 500); 16 Aug 2013 09:33:23 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 52065 invoked by uid 99); 16 Aug 2013 09:33:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2013 09:33:22 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kxepal@gmail.com designates 209.85.212.176 as permitted sender) Received: from [209.85.212.176] (HELO mail-wi0-f176.google.com) (209.85.212.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2013 09:33:15 +0000 Received: by mail-wi0-f176.google.com with SMTP id f14so595758wiw.9 for ; Fri, 16 Aug 2013 02:32:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=R0UbgfEWSTi7WAMhXT2uPgxeDdxIoCEW96T/XE5xXwo=; b=f+shki6ipM2ckBgkwfDTPaKX5VRIT8igyDDfr/LXL+b+ELXEyUqNW/si+C26Y4bxyq 5Uzn2oO7fVYXoJYrjgzXTcF0hbtRzPnkww3q69k2GWLcYNEbsv4pRxaHlMWPcmQZAPNU 35XtEz1n35BdNI/fYEl1K1ISE5a0SQxz402puS52Om4gRT05obKmOIIQPR6ozcaMrLf5 qHXWKeiTV1nK8oyGRTFrmQsg5tjeSgh6pMWbWdfRsvMUtb8unhBpSoS3F8T8AEJTpZIk glfFy5afWkw1/bqxLepdbCbi3KLA2Emj9TVs6XJidHcI27IfgIYddkn1mAtYj9E+Ytwk Y1LA== MIME-Version: 1.0 X-Received: by 10.194.232.40 with SMTP id tl8mr421195wjc.42.1376645575334; Fri, 16 Aug 2013 02:32:55 -0700 (PDT) Received: by 10.180.162.230 with HTTP; Fri, 16 Aug 2013 02:32:55 -0700 (PDT) In-Reply-To: References: <57E7BFC7-8B8E-4014-8569-B03F99B73E35@apache.org> <520DEB55.8090203@gmail.com> Date: Fri, 16 Aug 2013 13:32:55 +0400 Message-ID: Subject: Re: Erlang vs JavaScript From: Alexander Shorin To: "user@couchdb.apache.org" Cc: Volker Mische , "dev@couchdb.apache.org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Aug 16, 2013 at 1:12 PM, Benoit Chesneau wrote: > I agree, (modulo the fact that I would replace a string by a binary ;) but > that would be only possible if we extract the metadata (_id, _rev) from the > JSON so couchdb wouldn't have to decode the JSON to get them. Streaming > json would also allows that but since there is no guaranty in the > properties order of a JSON it would be less efficient. What if we split document metadata from document itself? E.g. pass _id, _rev and other system or meta fields with separate object. Their size much lesser than whole document, so it will be possible to fast decode this metadata and decide is doc need to be processed or not without need to decode/encode megabytes of document's json. Sure, this adds additional communication roundtrip, but in case if it will be faster than json decode/encode - why not? -- ,,,^..^,,,