Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 11263 invoked from network); 17 Jan 2011 11:28:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jan 2011 11:28:10 -0000 Received: (qmail 82526 invoked by uid 500); 17 Jan 2011 11:28:10 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 81929 invoked by uid 500); 17 Jan 2011 11:28:08 -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 81777 invoked by uid 99); 17 Jan 2011 11:28:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jan 2011 11:28:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jan 2011 11:28:04 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0HBRh4D014950 for ; Mon, 17 Jan 2011 11:27:43 GMT Message-ID: <18819582.12471295263663439.JavaMail.jira@thor> Date: Mon, 17 Jan 2011 06:27:43 -0500 (EST) From: "Filipe Manana (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Created: (COUCHDB-1027) More efficient implementation of the DB updater BTree functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 More efficient implementation of the DB updater BTree functions --------------------------------------------------------------- Key: COUCHDB-1027 URL: https://issues.apache.org/jira/browse/COUCHDB-1027 Project: CouchDB Issue Type: Improvement Components: Database Core Reporter: Filipe Manana Assignee: Filipe Manana Attachments: COUCHDB-1027.patch Currently, some of the BTree functions (by_id BTree reduce function and and by_seq BTree split function) traverse the same input lists several times to produce the output. This is not optimal. For example, the btree_by_id_reduce function, for a database with 300 000+ documents, can easily get a list of 50 or more #full_doc_info records. This functions traverses that list 4 times - 2 filtered list comprehensions plus two length/1 calls. The following patch changes the implementation to produce the same output with a single list traversal operation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.