[
https://issues.apache.org/jira/browse/COUCHDB-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982854#action_12982854
]
Randall Leeds commented on COUCHDB-1027:
----------------------------------------
Nice! I bet there's more like this lurking around.
> 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
> Fix For: 1.1, 1.2, 2.0
>
> 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.