You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/12/13 08:59:10 UTC

[GitHub] [couchdb] janl commented on a diff in pull request #4292: fix(3517): super-simplistic fix to avoid costly AST transforms when t…

janl commented on code in PR #4292:
URL: https://github.com/apache/couchdb/pull/4292#discussion_r1046828468


##########
src/docs/src/config/query-servers.rst:
##########
@@ -65,6 +65,19 @@ you can adjust the memory limitation (here, increasing to 512 MiB)::
 
 For more info about the available options, please consult ``couchjs -h``.
 
+.. note::
+    CouchDB versions 3.0.0 to 3.2.2 included a performance regression for
+    custom reduce functions. CouchDB 3.3.0 and later come with an experimental
+    fix to this issue that is included in a separate ``.js`` file.
+
+    To enable the fix, you need to define a custom ``COUCHDB_QUERY_SERVER_JAVASCRIPT``
+    environment variable as outlined above. The path to ``couchjs`` needs to
+    remain the same as you find it on your ``couchdb`` file, and the path to
+    ``main.js`` needs to be set to ``/path/to/couchdb/share/server/main-ast-bypass.js``.
+
+    With a default installation on Linux systems, this is going to be
+    ``COUCHDB_QUERY_SERVER_JAVASCRIPT="/opt/couchdb/bin/couchjs /opt/couchdb/share/server/main-ast-bypass.js"``

Review Comment:
   you can do this via env var, you don’t have to edit `bin/couchdb` — that’s just where you get the original paths that are valid for your system
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org