Hi
I am using the Viewer for .NET and have had feedback saying the time it take to load documents is much longer than the expected load time for documents of respective sizes.
I understand the process that the viewer uses to generate the display adds significant load time compared to just downloading a document.
At the moment we simply read the document into stream and return the view as the code below demonstrates. We use a simple IIS configuration as well.
Is there any ways that you recommend I can speed up the service without scaling machine resources?
var client = new HttpClient();
var stream = await client.GetStreamAsync(url);
var uri = new Uri(url);
var streamModel = new StreamModel()
{
DocumentStream = stream,
DocumentName = Path.GetFileName(uri.LocalPath),
DocumentExtension = Path.GetExtension(uri.LocalPath),
DocumentDisplayName = Path.ChangeExtension(title, Path.GetExtension(uri.LocalPath)),
Color = String.Concat("#", color),
FullFileName = uri.LocalPath.Split(’/’).Last(),
StartDate = DateTime.UtcNow
};
return View(streamModel);
Thanks
Sam