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. Requesting persisted index is ok. Taking in account CouchDB persists everything, it‘s not in-memory DB (which is again great), I‘d say it‘s even fast.
> Performance in this (Erlang) area also appeared to be proportional to the code size of the map function
Performance in this area depends much more on how branchy is the json doc being processed. It‘s not about CouchDB itself, it‘s about json parser used. There might be a situation when you have better perf using JS views.
> Nothing about this is relaxing.
Indeed. But then it just works, for years, with zero maintenance even for replications – the result I‘ve never even nearly achieved with any other DB I used.