Split LeafOutputFile content into different table for performance

This commit is contained in:
2016-05-23 15:23:36 -04:00
parent 790e2494e3
commit 55f7b68bf8
21 changed files with 307 additions and 19 deletions
+2 -2
View File
@@ -63,7 +63,7 @@ namespace LeafWeb.Core.Entities
foreach (var outputFile in OutputFiles.Where(f => !fileType.HasValue || f.FileType==fileType.Value))
{
var entry = archive.CreateEntry(outputFile.Filename);
using (var originalFileStream = new MemoryStream(outputFile.Contents))
using (var originalFileStream = new MemoryStream(outputFile.FileContents.Contents))
using (var entryStream = entry.Open())
originalFileStream.CopyTo(entryStream);
}
@@ -73,7 +73,7 @@ namespace LeafWeb.Core.Entities
public int GetOutputFileSizeSum()
{
return OutputFiles.Sum(o => o.Contents.Length);
return OutputFiles.Sum(o => o.FileContents.Contents.Length);
}
}
}