Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change removes some inefficiencies in the btree module: 1) Building unnecessary tuples when the extract and assemble functions are the default ones (as is the case for views). For this case, just don't build any tuples nor do any assemble/extract function calls; 2) Traversing a list of KVs and applying the assemble function to build a new list - this is waste of time and cpu when the assemble function is the default one (as in the case for views); 3) Traversing the same list 2 times and reversing an accumulator when encoding a kp node. This can be done in a single pass with the list comprehension expression and avoiding the need to keep a list accumulator and reverse it at the end. This was found it profiling data from fprof. Nearly no impact on view updates (due to existing pipelining), however view compaction had gains of about 6% regarding time. Very small impact as well on query response time. Change-Id: I0b9b8e013deede1bdba86f4f1ba2d4cc052bbbb4 Reviewed-on: http://review.couchbase.org/25353 Reviewed-by: Volker Mische <volker.mische@gmail.com> Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
- Loading branch information
Showing
4 changed files
with
75 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters