mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Log Refresh timing information for both sync/async
For async refreshes (from UI thread) it would only log the time it took to schedule the refreshXxx calls, which is not useful.
This commit is contained in:
parent
9bb9fc8933
commit
2f60280eb6
|
|
@ -142,10 +142,7 @@ func (self *refreshBounceBatch) close() []func() {
|
|||
}
|
||||
|
||||
func (self *RefreshHelper) performRefresh(options types.RefreshOptions, calledFromWorker bool) {
|
||||
t := time.Now()
|
||||
defer func() {
|
||||
self.c.Log.Infof("Refresh took %s", time.Since(t))
|
||||
}()
|
||||
startTime := time.Now()
|
||||
|
||||
// A refresh from a worker blocks that worker until it's done; one from the
|
||||
// UI thread returns immediately and finishes in the background.
|
||||
|
|
@ -432,6 +429,8 @@ func (self *RefreshHelper) performRefresh(options types.RefreshOptions, calledFr
|
|||
// still pre-refresh.
|
||||
self.onUIThread(env.background, options.Then)
|
||||
}
|
||||
|
||||
self.c.Log.Infof("Refresh took %s", time.Since(startTime))
|
||||
}
|
||||
|
||||
// waitAndFinalize blocks until every scope is done. Run it inline when we're
|
||||
|
|
|
|||
Loading…
Reference in a new issue