Improved speed of XCI Trimmer read headers by removing garbage collect and superfluous read

This commit is contained in:
Aaron Murgatroyd 2025-05-19 22:32:39 +10:00
parent 4d16b2b4e4
commit 449333c451
2 changed files with 7 additions and 4 deletions

View file

@ -142,7 +142,6 @@ namespace Ryujinx.Common.Utilities
{
Log = log;
Filename = path;
ReadHeader();
}
public void CheckFreeSpace(CancellationToken? cancelToken = null)
@ -435,7 +434,6 @@ namespace Ryujinx.Common.Utilities
_binaryReader.Close();
_binaryReader = null;
_fileStream = null;
GC.Collect();
}
private void ReadHeader()

View file

@ -76,8 +76,13 @@ namespace Ryujinx.Ava.UI.ViewModels
foreach (ApplicationData xciApp in apps)
{
AddOrUpdateXCITrimmerFile(CreateXCITrimmerFile(xciApp.Path));
_mainWindowViewModel.StatusBarProgressValue = ++appsProcessed;
Dispatcher.UIThread.InvokeAsync(() => { }, DispatcherPriority.Render).Wait();
if (appsProcessed % 50 == 0)
{
_mainWindowViewModel.StatusBarProgressValue = appsProcessed;
Dispatcher.UIThread.InvokeAsync(() => { }, DispatcherPriority.Render).Wait();
}
appsProcessed++;
}
}
finally