From 4708e0afcfeaaa9821c9910902495972fc5733ac Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Mon, 4 May 2009 22:23:39 +0000 Subject: hinting to reduce sparseness in chunked attachment puts git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@771472 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_db.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/couchdb/couch_db.erl b/src/couchdb/couch_db.erl index db865482..4cd5a5fd 100644 --- a/src/couchdb/couch_db.erl +++ b/src/couchdb/couch_db.erl @@ -624,10 +624,12 @@ make_writer_fun(Stream) -> {ok, {FinalLen, SpFin}}; ({Length, Bin}, {Total, nil}) -> % save StreamPointer + ok = couch_stream:set_min_buffer(Stream, Length), {ok, StreamPointer} = couch_stream:write(Stream, Bin), {Total+Length, StreamPointer}; ({Length, Bin}, {Total, SpAcc}) -> % write the Bin to disk + ok = couch_stream:set_min_buffer(Stream, Length), {ok, _Sp} = couch_stream:write(Stream, Bin), {Total+Length, SpAcc} end. -- cgit v1.2.3