From 062da8deb5f01e088bb514dcbc16c626536d4a0a Mon Sep 17 00:00:00 2001 From: Terry Tice Date: Fri, 11 May 2012 14:59:50 -0400 Subject: [PATCH] If an edge already exists, don't run through the commit graph again. This should speed up the loading of the graph. --- SeeGitApp/Models/RepositoryGraphBuilder.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SeeGitApp/Models/RepositoryGraphBuilder.cs b/SeeGitApp/Models/RepositoryGraphBuilder.cs index 1fcc359..274fd7c 100644 --- a/SeeGitApp/Models/RepositoryGraphBuilder.cs +++ b/SeeGitApp/Models/RepositoryGraphBuilder.cs @@ -93,6 +93,10 @@ private void AddCommitsToGraph(Commit commit, CommitVertex childVertex) _graph.AddEdge(edge); _edges.Add(edge.Id, edge); } + else + { + return; + } } foreach (var parent in commit.Parents)