Performance issue with stream download
I am downloading 400 MB file on local machine with 7 MB/Second (.net core 2.0) same code run with .net framework 4.6 download speed 100 MB/Second.
public IActionResult DownloadDocument(Guid documentUniqueId) { var bytes = System.IO.File.OpenRead(@"D:\home\site\wwwroot\file\Organizer01_2017-09-03 (14) (3).zip"); return File(bytes, "application/octet-stream");
} File size 400 MB . API on local system. FIle on local system
@JeremyKuhne can we get this tracked in dotnet/corefx?
This issue was also opened as: https://github.com/aspnet/Performance/issues/246
@chintan3100 We need to know exactly how the FileStream is being written. What is the File class you're using? If you're writing via ASP.NET apis it would probably be better to start on that end.
I am using .net core. Please refer below code
public IActionResult DownloadDocument(Guid documentUniqueId) { var bytes = System.IO.File.OpenRead(@"D:\home\site\wwwroot\file\Organizer01_2017-09-03 (14) (3).zip"); return File(bytes, "application/octet-stream");
}
Presumably you're talking about System.Web.Mvc.Controller.File. You should probably start with https://github.com/aspnet/Mvc/issues. The ASP.NET team is the right starting point.
Moved this issue here: https://github.com/aspnet/Home/issues/2233