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 3F7429B49 for ; Wed, 6 Mar 2013 15:26:57 +0000 (UTC) Received: (qmail 92783 invoked by uid 500); 6 Mar 2013 15:26:55 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 92493 invoked by uid 500); 6 Mar 2013 15:26:55 -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 92460 invoked by uid 99); 6 Mar 2013 15:26:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Mar 2013 15:26:54 +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 (athena.apache.org: domain of matthieu.rakotojaona@gmail.com designates 74.125.82.180 as permitted sender) Received: from [74.125.82.180] (HELO mail-we0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Mar 2013 15:26:50 +0000 Received: by mail-we0-f180.google.com with SMTP id k14so8009667wer.39 for ; Wed, 06 Mar 2013 07:26:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=c2mrkZL3Nl4PlYqpXssWCyuI7142jbaoXpfGi3DQiX8=; b=FKobillB9lB5VDVtUzhcpzc0qS+oKU8qDjsLgRpGiT0arMqosPuaM0m8eSMGfi6zZv XyKrrFZYDCz2eXxCHeYAWfOBDzyOGnHp63KIIzIdBUYD00FLyTJ9TkIC6PS5fXcU9BK/ aVgAbU5MdJ9jV3bCLaOROpEL2ibCNm6CsSon8GHGliV7UfdNyQiKiOc+uvPEXb4rAMbc FJtLGkiNbuCEnFiEWocwDmzqhGf+WpItCtt0ZVGvgIVBUL6zqY8ZmI7RaJLO2eVr7sKk V2+A3ZmFBDNhVhA473/XC9fPBxoyWd4G4yXKTphuygl5vxl525cZpt/pfCXRy+CmuT99 5MQg== X-Received: by 10.180.74.228 with SMTP id x4mr27216720wiv.0.1362583588799; Wed, 06 Mar 2013 07:26:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.89.233 with HTTP; Wed, 6 Mar 2013 07:26:08 -0800 (PST) In-Reply-To: References: <5134AD10.9090501@gmail.com> <-162955323123900829@unknownmsgid> <85730134-1AF5-4C63-89A4-8F8F551C4EF2@couchbase.com> From: Matthieu Rakotojaona Date: Wed, 6 Mar 2013 16:26:08 +0100 Message-ID: Subject: Re: view crashes chrome To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Mar 5, 2013 at 5:22 PM, Alexander Gabriel wrote: > Seems like this really is a Chrome issue and has nothing to do with > CouchDb. I think downloading the whole documents for each processing is a bad idea, whatever the browser. You should try to better think your views; Here are some simple thoughts on how to do it. Basically, you have a document with multiple fields. I'll take [0] as an example doc and build upon it. (I have a question first: Why do you have 3 similar structures (I'm talking about CSCF(2009), ZH Artengruppen and ZH GIS). When the user wants a document, do you consider each of those as being different, or should the 3 be merged and seen as 1 document in the output ?) The view you will need will look like this: for each doc: for each unitary output doc: -> if the 3 docs are counted as 3 different ones for each field in Felder: emit(field, null) This will give you a huge list of all the fields available for each document. You will then retrieve it from the client; use a reduce function (like _count) to group the fields if they are similar. You now have a list of all possible fields on your client. You can build the filter panel with this (ie you know what fields you can filter from), and you can also prefill the export panel. Now, the user can select the fields he wants to use as a filtering. Don't send anything to the server yet ! Just build a list of all the fields you want to keep. In parallel, you can also build the list of fields you want to export in the appropriate panel. Next step is to use a _list function to retrieve the documents that have all the fields (and, if needed, transform to csv also in the _list function). This _list function would accept a filter_list and an export_list parameters, the first one being the fields a doc must have to be exported, and the second one the list of fields to be exported. You can then convert your documents and send them back to the client. [0] http://www.barbalex.iriscouch.com/_utils/document.html?artendb/00005A48-816B-4A30-842F-3B1A5DAAAAC3 -- Matthieu RAKOTOJAONA