diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-28 11:22:11 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-28 11:59:45 +1100 |
commit | 3f7ec3f3b801f33ca8b2bc436d8f047cdf57b4f0 (patch) | |
tree | 7d300178ab6d053c867deb2aaac28c0dcbd86cbf /pkg/gui/gui.go | |
parent | 19604214d7da76a685085961095c1d7b2ad5f5cb (diff) |
load reflog commits in two stages to speed up startup time
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index bb8121a2d..7f7e040f0 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -178,6 +178,12 @@ type searchingState struct { searchString string } +// startup stages so we don't need to load everything at once +const ( + INITIAL = iota + COMPLETE +) + type guiState struct { Files []*commands.File Branches []*commands.Branch @@ -208,6 +214,7 @@ type guiState struct { PrevMainWidth int PrevMainHeight int OldInformation string + StartupStage int // one of INITIAL and COMPLETE. Allows us to not load everything at once } // for now the split view will always be on |