summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2014-04-30 02:19:53 -0700
committerKevin Mitchell <kevmitch@gmail.com>2014-05-12 15:09:38 -0700
commita6762dbc16cd94e8998e07b6f2fcefbe6a43bb6d (patch)
treef4499783fe6bc46f09b50b79abd2eda497850b49 /stream
parent9e94de29b7f38a6460ae680f4274f41c269a48d2 (diff)
downloadmpv-a6762dbc16cd94e8998e07b6f2fcefbe6a43bb6d.tar.bz2
mpv-a6762dbc16cd94e8998e07b6f2fcefbe6a43bb6d.tar.xz
stream_smb: increase to 128k read_chuuk from default 8k
Previous to this commit, read_chunk was not set in stream_smb. The cache was therefore filled in small 8K chunks. This resulted in poor performance when compared to, for example, smbnetfs on the same network. The value of 128k is chosen both because it is emperically the "levelling off point" for throughput into mpv's cache, and because it is the value chosen by smbnetfs when serving smb shares to mpv. Note that this change has no effect unless --cache is explicitly specified as smb:// streams do not activate cache by default. This is because the default cache size of 320K is so small it actually makes smb:// perfomance worse. For best results use at least --cache=1024.
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_smb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stream/stream_smb.c b/stream/stream_smb.c
index 3af98b4702..ab32ea0d3a 100644
--- a/stream/stream_smb.c
+++ b/stream/stream_smb.c
@@ -140,6 +140,7 @@ static int open_f (stream_t *stream, int mode)
stream->write_buffer = write_buffer;
stream->close = close_f;
stream->control = control;
+ stream->read_chunk = 128 * 1024;
return STREAM_OK;
}