Oh, I didn’t mean streaming in terms of a streaming parser. What I meant is realtime web apps that constantly exchanging transit payloads (“streaming”)
but the answer here is usual: it’s better to do less work (less data) than trying to optimize the algorithm
if you want the absolute best performance you might be better off with a custom binary format. doubt that it makes much of difference whether you use recursion or not unless you are sending really deeply nested data. lots of smaller messages likely won't see a big difference but no clue what your data looks like. 😉
good point about nested data and recursion