* the `Commands.QueryCommitChildren` takes too much time when executes in a large repo

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-11 10:26:34 +08:00
parent a969bd9c99
commit 82320f3494
No known key found for this signature in database
9 changed files with 4 additions and 93 deletions

View file

@ -78,12 +78,6 @@ namespace SourceGit.ViewModels
}
}
public AvaloniaList<string> Children
{
get;
private set;
} = new AvaloniaList<string>();
public string SearchChangeFilter
{
get => _searchChangeFilter;
@ -513,7 +507,6 @@ namespace SourceGit.ViewModels
VisibleChanges = null;
SelectedChanges = null;
ViewRevisionFileContent = null;
Children.Clear();
if (_commit == null)
return;
@ -530,12 +523,6 @@ namespace SourceGit.ViewModels
Dispatcher.UIThread.Invoke(() => SignInfo = signInfo);
});
Task.Run(() =>
{
var children = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA).Result();
Dispatcher.UIThread.Invoke(() => Children.AddRange(children));
});
if (_cancelToken != null)
_cancelToken.Requested = true;