Skip to content

Commit

Permalink
Attempt to improve listview performance #44
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsPepperpot committed Sep 8, 2024
1 parent ec5bb8b commit b6cacff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions IndustrialPark/ArchiveEditor/ArchiveEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,10 @@ private void PopulateAssetList(AssetType type = AssetType.Null, List<uint> asset
if (type == AssetType.Null || asset.assetType == type)
items.Add(ListViewItemFromAsset(asset, (select == true) && selectionAssetIDs.Contains(asset.assetID)));
}

listViewAssets.Items.AddRange(items.ToArray());
var itemsArray = items.ToArray();
listViewAssets.BeginUpdate();
listViewAssets.Items.AddRange(itemsArray);
listViewAssets.EndUpdate();
}

listViewAssets.EndUpdate();
Expand Down

0 comments on commit b6cacff

Please sign in to comment.