From d895beb3f428340ad71013ab0543cb76f57a1108 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 19 Feb 2024 17:40:36 +0800 Subject: [PATCH] optimize: reduce CPU usage --- src/Commands/Fetch.cs | 2 ++ src/Views/Histories.axaml.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Commands/Fetch.cs b/src/Commands/Fetch.cs index 968ff1ca..1c5acebb 100644 --- a/src/Commands/Fetch.cs +++ b/src/Commands/Fetch.cs @@ -81,6 +81,8 @@ namespace SourceGit.Commands { job.Cmd.Exec(); job.NextRunTimepoint = DateTime.Now.AddSeconds(_fetchInterval); } + + Thread.Sleep(2000); } }); } diff --git a/src/Views/Histories.axaml.cs b/src/Views/Histories.axaml.cs index 0cb5d8fa..b05cee07 100644 --- a/src/Views/Histories.axaml.cs +++ b/src/Views/Histories.axaml.cs @@ -205,7 +205,7 @@ namespace SourceGit.Views { public partial class Histories : UserControl { public Histories() { - InitializeComponent(); + InitializeComponent(); } protected override void OnUnloaded(RoutedEventArgs e) {