Skip to content

Commit 257df07

Browse files
committed
VIX-3791 Initialize list capacity with the known count of marks
1 parent 5773944 commit 257df07

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Vixen.Modules/Editor/TimedSequenceEditor/Forms/WPF/MarksDocker/Services/MarkImportExportService.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,6 @@ public static async Task ExportMarkCollections(MarkExportType exportType, IList<
585585

586586
if (exportType == MarkExportType.PangolinBeyond)
587587
{
588-
List<string> beatMarks = new List<string>();
589-
590588
//Create a list of marks
591589
var markRecords = new List<MarkRecord>();
592590
foreach (var emc in collections)
@@ -600,8 +598,9 @@ public static async Task ExportMarkCollections(MarkExportType exportType, IList<
600598
}
601599
}
602600

603-
var orderedMarks = markRecords.OrderBy(x => x.StartTime);
601+
var orderedMarks = markRecords.OrderBy(x => x.StartTime).ToList();
604602

603+
var beatMarks = new List<string>(orderedMarks.Count + 1);
605604
//Add the required header
606605
beatMarks.Add("#,Name,Start,Color");
607606
int markNum = 1;

0 commit comments

Comments
 (0)