We have an api that queries 15~30 docs at a time with n1ql, which is very fast.
While benchmarking the api, we’ve found that json_decode takes pretty good amount of CPU % in PHP application.
I manually combined all of them into one single document and tested the api again. It is much faster. I suspect that decoding one big doc is faster than decoding multiple smaller docs.
Is there a way to put multiple docs into an array so that the result gets treated as if it was a single doc in a language?