diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-29 09:32:58 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-29 09:39:22 +1000 |
commit | 5f30ccfbc3f560520c8eae50d7fbf138cdf4d0da (patch) | |
tree | 86e63e72f927c528254356615033ff4458ad3ee7 /pkg/gui/view_helpers.go | |
parent | 71cab4fadc84fff893aa797482b3436ea2faae8a (diff) |
Log duration of post-refresh-update call
Notably, the reflog view is taking ages here because it's got a
few thousand lines to write to the view.
In future we should only populate the view's viewport.
Diffstat (limited to 'pkg/gui/view_helpers.go')
-rw-r--r-- | pkg/gui/view_helpers.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index 85ec21128..58c973712 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -1,6 +1,8 @@ package gui import ( + "time" + "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/jesseduffield/lazygit/pkg/tasks" @@ -129,6 +131,11 @@ func (gui *Gui) render() { // if the context's view is set to another context we do nothing. // if the context's view is the current view we trigger a focus; re-selecting the current item. func (gui *Gui) postRefreshUpdate(c types.Context) error { + t := time.Now() + defer func() { + gui.Log.Infof("postRefreshUpdate for %s took %s", c.GetKey(), time.Since(t)) + }() + if err := c.HandleRender(); err != nil { return err } |