couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject documentation commit: updated refs/heads/master to 45ff179
Date Sat, 10 Jan 2015 21:08:13 GMT
Repository: couchdb-documentation
Updated Branches:
  refs/heads/master 117fce00e -> 45ff17968


Minor reduce function notes clean up

This closes #11

Signed-off-by: Alexander Shorin <kxepal@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/commit/45ff1796
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/tree/45ff1796
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/diff/45ff1796

Branch: refs/heads/master
Commit: 45ff179683b9dba422d4fad3779b50e287f0871e
Parents: 117fce0
Author: Antti Siponen <antti.siponen@iki.fi>
Authored: Fri Jan 9 21:18:52 2015 +0100
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Sun Jan 11 00:03:47 2015 +0300

----------------------------------------------------------------------
 src/couchapp/ddocs.rst | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/45ff1796/src/couchapp/ddocs.rst
----------------------------------------------------------------------
diff --git a/src/couchapp/ddocs.rst b/src/couchapp/ddocs.rst
index a1d4f11..52d411c 100644
--- a/src/couchapp/ddocs.rst
+++ b/src/couchapp/ddocs.rst
@@ -172,16 +172,16 @@ JavaScript below:
 
    While `map` functions have limited access to stored modules through
    :func:`require` function there is no such feature for `reduce` functions.
-   The reason lies deep inside in mechanism how `map` and `reduce` functions
-   are processed by Query Server. Let's take a look on `map` functions first:
+   The reason lies deep inside in the mechanism how `map` and `reduce` functions
+   are processed by the Query Server. Let's take a look on `map` functions first:
 
-   #. CouchDB sends all `map` functions for processed design document to
+   #. CouchDB sends all `map` functions for a processed design document to
       Query Server.
    #. Query Server handles them one by one, compiles and puts them onto an
       internal stack.
    #. After all `map` functions had been processed, CouchDB will send the
       remaining documents to index one by one.
-   #. The Query Server receives the document object and applies it to every function
+   #. Query Server receives the document object and applies it to every function
       from the stack. The emitted results are then joined into a single array and sent
       back to CouchDB.
 
@@ -191,15 +191,15 @@ JavaScript below:
       with result list of key-value pairs that was previously received as
       result of `map` functions work.
    #. Query Server compiles reduce functions and applies them to key-value
-      lists. Reduced result sends back to CouchDB.
-
-   As you may note, `reduce` functions been applied in single shot while
-   `map` ones are applied in an iterative way per each document. This means that
-   it's possible for `map` functions to precompile CommonJS libraries and use them
-   during the entire view processing, but for `reduce` functions it will be
-   compiled again and again for each view result reduction, which will lead to
-   performance degradation (`reduce` function are already does hard work to make
-   large result smaller).
+      lists. Reduced result is sent back to CouchDB.
+
+   As you may note, `reduce` functions are applied in a single shot to the map results
+   while the `map` functions are applied in an iterative way to one document at a time.
+   This means that it's possible for `map` functions to precompile CommonJS libraries
+   and use them during the entire view processing, but for `reduce` functions they
+   would be compiled again and again for each view result reduction, which would lead
+   to performance degradation (`reduce` function are already working hard to make large
+   results smaller).
 
 
 .. _showfun:


Mime
View raw message