Earlier quoted context omitted.
God, where to start. Map/reduce views ("secondary indexes") are currently built by serializing JSON down a pipe to an external process called couchjs that links against a seven year old version of Mozilla Spidermonkey (1.8.5, released on March 31st 2011, and the only version it currently works with). This external process then pipes the map results back, again as JSON. Forget zerocopy; we're serializing and deseriali…
> Nothing is streaming Except CouchDB entire REST API, where nearly every endpoint streams result row by row, which is great. > Performance (and likely security, due to age of the engine) in this subsystem is extremely poor As of security: wrong guess. Go compare number of critical CouchDB CVE for last, say, 5 years, with any other DB you want. As for query server: indexing is slow for the reasons you pointed out. Re…
I'm talking about the internals of couchjs.
> As of security: wrong guess. Go compare number of critical CouchDB CVE
I'm talking about Spidermonkey 1.8.5, which is seven years old. Multiple CVEs have been reported including a full RCE, which was patched in later versions. If you believe these are patched in libmozjs185, I'd love to see a link to the source package showing where the fix was applied. Because I can't find it.
Further: https://www.cvedetails.com/vulnerability-list/vendor_id-45/p.... Another full RCE in CouchDB.
> Performance in this area depends much more on how branchy is the json doc being processed
Citation needed. There's an issue specifically about this in the CouchDB issue tracker if you'd like to read more.
> As for query server: indexing is slow for the reasons you pointed out.
Right. It is not performant. That's my point.
Curious what kind of database sizes you're working with too; you won't see this stuff with a few hundred documents.