From a6762dbc16cd94e8998e07b6f2fcefbe6a43bb6d Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Wed, 30 Apr 2014 02:19:53 -0700 Subject: 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. --- stream/stream_smb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'stream') 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; } -- cgit v1.2.3