aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2025-02-05 16:22:06 +0100
committerLoïc Hoguin <[email protected]>2025-02-05 16:22:06 +0100
commit9d4912208e91c1cb3195bf86966a84e88e7c9ff9 (patch)
tree81cc529f19c517108ccf52bd03549ea66756a329 /src
parent073c481656915f5c9c61f6ecea15a1754469a1f7 (diff)
downloadcowboy-9d4912208e91c1cb3195bf86966a84e88e7c9ff9.tar.gz
cowboy-9d4912208e91c1cb3195bf86966a84e88e7c9ff9.tar.bz2
cowboy-9d4912208e91c1cb3195bf86966a84e88e7c9ff9.zip
Lower the lower dynamic buffer value to 1024
There's not a big performance difference between 8192 and 1024 so let's use less memory at the start of the connection.
Diffstat (limited to 'src')
-rw-r--r--src/cowboy.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy.erl b/src/cowboy.erl
index c685649..dbe4d34 100644
--- a/src/cowboy.erl
+++ b/src/cowboy.erl
@@ -166,7 +166,7 @@ ensure_dynamic_buffer(TransOpts, #{dynamic_buffer := DynamicBuffer}) ->
ensure_dynamic_buffer(TransOpts=#{socket_opts := SocketOpts}, _) ->
case proplists:get_value(buffer, SocketOpts, undefined) of
undefined ->
- {TransOpts#{socket_opts => [{buffer, 8192}|SocketOpts]}, {8192, 131072}};
+ {TransOpts#{socket_opts => [{buffer, 1024}|SocketOpts]}, {1024, 131072}};
_ ->
{TransOpts, false}
end.