From 66f3c6c73030d4f723ec9a3c36dfd32c52f0c5a3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 3 Dec 2018 10:39:54 +0000 Subject: avoid a data copy --- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/Servers/HttpServer') diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 0522814..fe3b8a0 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -843,7 +843,10 @@ namespace OpenSim.Framework.Servers.HttpServer if (!response.SendChunked && response.ContentLength64 <= 0) response.ContentLength64 = buffer.LongLength; - response.OutputStream.Write(buffer, 0, buffer.Length); + //response.OutputStream.Write(buffer, 0, buffer.Length); + response.RawBufferStart = 0; + response.RawBufferLen = buffer.Length; + response.RawBuffer = buffer; } // Do not include the time taken to actually send the response to the caller in the measurement @@ -851,7 +854,9 @@ namespace OpenSim.Framework.Servers.HttpServer // server requestEndTick = Environment.TickCount; + buffer = null; response.Send(); + response.RawBuffer = null; } catch (SocketException e) { -- cgit v1.1