Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 43955 invoked from network); 2 Jul 2009 21:17:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Jul 2009 21:17:05 -0000 Received: (qmail 91123 invoked by uid 500); 2 Jul 2009 21:17:14 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 91045 invoked by uid 500); 2 Jul 2009 21:17:14 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 91035 invoked by uid 99); 2 Jul 2009 21:17:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2009 21:17:14 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.217.213 as permitted sender) Received: from [209.85.217.213] (HELO mail-gx0-f213.google.com) (209.85.217.213) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2009 21:17:06 +0000 Received: by gxk9 with SMTP id 9so3135661gxk.11 for ; Thu, 02 Jul 2009 14:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=3Z1seI7Tn5lWkIGq2ZJbxtEwSkOTYSioLL3/gh/IKaU=; b=qJGjUjoc1esyGeY8x5sNR7eE9uZ8EcljLFxd6Td5VfyDaTFnenQGj04HC7e1NOk9q8 TSKlggpNlPAYeYsbjldS3Rx9ijPtoaIFL/B9SxOD5n1vSW+0EK49BJyddtCp+yiX4u6E fAHvjFFDy9k6pxQIFboFsQtPV5z+YVXElOGpk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=lnrYaaZnzBwQO8SqLauex2enfeDwl1FVDP30gmUnIxyXxJ63f5LQoAKA9t3bJMeWvu vaDMvh03jKT46heIJtT6/lJ9uxdd8SbWr8Ttq3S1mFittJ3WepklvGurm4DKoi+D/GA7 07RKNx3Mbb0BUVeKGrVJdnqrWMhuDBoUp0tRk= MIME-Version: 1.0 Received: by 10.100.105.15 with SMTP id d15mr752946anc.140.1246569405881; Thu, 02 Jul 2009 14:16:45 -0700 (PDT) In-Reply-To: <20090702211434.GA15939@uk.tiscali.com> References: <060429AB-10DE-482B-8993-27FBD486F191@jasondavies.com> <20090702211434.GA15939@uk.tiscali.com> Date: Thu, 2 Jul 2009 17:16:45 -0400 Message-ID: Subject: Re: View Performance (was Re: The 1.0 Thread) From: Paul Davis To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Jul 2, 2009 at 5:14 PM, Brian Candler wrote: > On Thu, Jul 02, 2009 at 06:16:11PM +0100, Jason Davies wrote: >> Nice work! =A0I'd be interested to see what kind of performance increase >> we get from Spidermonkey 1.8.1, which comes with native JSON parsing/ >> encoding. > > I noted that main.js already uses native JSON parsing, in the sense of > eval(). But the JSON encoding clearly could benefit from speeding up. > > Rather than migrate completely to 1.8.1, would it be possible to bolt on = a > JSON.encode C extension to 1.7? (Although of course that still involves > building a custom 1.7, unless js has a way to dynamically load extensions= ) > You don't need to load anything into spidermonkey for native encoding, just create a C function that can parse JSON and load it into the context. You can see the examples of things like print and evalcx that are already in couch_js.c