update stream buffering

This commit is contained in:
Luke Pulverenti
2015-07-31 16:38:08 -04:00
parent 25395c5d82
commit a7b25c065c
6 changed files with 27 additions and 72 deletions

View File

@@ -81,6 +81,9 @@ namespace MediaBrowser.Server.Implementations.HttpServer
WriteToInternal(responseStream);
}
// 256k
private const int BufferSize = 262144;
/// <summary>
/// Writes to async.
/// </summary>
@@ -92,7 +95,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
{
using (var src = SourceStream)
{
src.CopyTo(responseStream);
src.CopyTo(responseStream, BufferSize);
}
}
catch (Exception ex)