mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 00:16:23 +02:00
Improved speed of XCI Trimmer read headers by removing garbage collect and superfluous read
This commit is contained in:
parent
4d16b2b4e4
commit
449333c451
2 changed files with 7 additions and 4 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue