Repository: couchdb-couch-mrview Updated Branches: refs/heads/master b743459e4 -> d72580062
Avoid gratuitous list flattening Mochiweb and gen_tcp are perfectly happy with iolists. Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/4038d9eb Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/4038d9eb Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/4038d9eb Branch: refs/heads/master Commit: 4038d9eb0cb9b1c291fdcfafa5fcd12ad1b85e3c Parents: b743459 Author: Adam Kocoloski <[email protected]> Authored: Mon Jul 20 15:53:18 2015 -0400 Committer: Adam Kocoloski <[email protected]> Committed: Mon Jul 20 15:53:18 2015 -0400 ---------------------------------------------------------------------- src/couch_mrview_http.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/4038d9eb/src/couch_mrview_http.erl ---------------------------------------------------------------------- diff --git a/src/couch_mrview_http.erl b/src/couch_mrview_http.erl index ccc8dc1..d0da69e 100644 --- a/src/couch_mrview_http.erl +++ b/src/couch_mrview_http.erl @@ -343,8 +343,7 @@ view_cb({meta, Meta}, #vacc{resp=Resp}=Acc) -> undefined -> []; UpdateSeq -> [io_lib:format("\"update_seq\":~p", [UpdateSeq])] end ++ ["\"rows\":["], - Prepend = prepend_val(Acc), - Chunk = lists:flatten(Prepend ++ "{" ++ string:join(Parts, ",") ++ "\r\n"), + Chunk = [prepend_val(Acc), "{", string:join(Parts, ","), "\r\n"], {ok, Resp1} = chttpd:send_delayed_chunk(Resp, Chunk), {ok, Acc#vacc{resp=Resp1, prepend=""}}; view_cb({row, Row}, Acc) ->
