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:
Stefan Haller 2026-07-09 18:21:45 +02:00
parent 9bb9fc8933
commit 2f60280eb6

View file

@ -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