diff options
author | sr55 <[email protected]> | 2020-09-07 22:44:30 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2020-09-07 22:44:30 +0100 |
commit | f6bb5723d1d4a23a3878628bb6fe146f536d1f8a (patch) | |
tree | 8f5df36bc369c7870223f7022442f60bba658b8f /win/CS/HandBrakeWPF | |
parent | 1f508c502ae404e02df0305b9223df229a520c01 (diff) |
WinGui: Performance Optimisation to the summary tab. Don't request previews when previews are turned off. Also thrown the delayed action processor on to avoid doing unnecessary work when bulk adding to the queue. #3117
Queue add should be near instant now.
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Queue/QueueService.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs b/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs index 44e2eb31a..7789a14fd 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs @@ -575,7 +575,7 @@ namespace HandBrakeWPF.Services.Queue { try { - delayedQueueBackupProcessor.PerformTask(() => this.BackupQueue(string.Empty), 1000); + delayedQueueBackupProcessor.PerformTask(() => this.BackupQueue(string.Empty), 200); } catch (Exception) { diff --git a/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs index 544956916..d07d4187d 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SummaryViewModel.cs @@ -52,6 +52,8 @@ namespace HandBrakeWPF.ViewModels private bool showPreview; + private DelayedActionProcessor previewDelayProcessor = new DelayedActionProcessor(); + public SummaryViewModel(IScan scanService, IUserSettingService userSettingService) { this.scanService = scanService; @@ -390,7 +392,10 @@ namespace HandBrakeWPF.ViewModels } this.PopulateSummaryTab(); - this.UpdatePreviewFrame(); + if (this.ShowPreview) + { + this.previewDelayProcessor.PerformTask(this.UpdatePreviewFrame, 250); + } } public void SetContainer(OutputFormat container) |