Performance improvement for repository merge step

This commit is contained in:
Cristian Petruta 2019-07-11 20:28:31 -07:00
Родитель 86073341c9
Коммит 634eecb912
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -203,6 +203,7 @@ namespace Microsoft.UpdateServices.Storage
var parentRepositoryInternal = ParentRepository as IRepositoryInternal;
List<Update> newBundlingUpdates = new List<Update>();
List<Update> addedUpdates = new List<Update>();
foreach (var newUpdate in queryResult.Updates)
{
@ -212,6 +213,7 @@ namespace Microsoft.UpdateServices.Storage
newUpdate.LastChanged = DateTime.Now;
Index.Add(newUpdate.Identity, newUpdate);
addedUpdates.Add(newUpdate);
using (var newMetadataStream = File.OpenRead(queryResult.GetUpdateXmlPath(newUpdate)))
{
@ -268,7 +270,8 @@ namespace Microsoft.UpdateServices.Storage
var productsList = categories.Products.Values.ToList();
var classificationsList = categories.Classifications.Values.ToList();
foreach (var update in Index.Values)
// Fill in product and classification information.
foreach (var update in addedUpdates)
{
var updateWithProduct = update as IUpdateWithProductInternal;
if (updateWithProduct != null)