diff --git a/src/webviews/commitDetails/commitDetailsWebviewView.ts b/src/webviews/commitDetails/commitDetailsWebviewView.ts index d160bfa..6c7b867 100644 --- a/src/webviews/commitDetails/commitDetailsWebviewView.ts +++ b/src/webviews/commitDetails/commitDetailsWebviewView.ts @@ -11,14 +11,16 @@ import { GitFile } from '../../git/models/file'; import type { IssueOrPullRequest } from '../../git/models/issue'; import type { PullRequest } from '../../git/models/pullRequest'; import type { GitRevisionReference } from '../../git/models/reference'; +import { Logger } from '../../logger'; import type { ShowCommitInGraphCommandArgs } from '../../plus/webviews/graph/graphWebview'; import { executeCommand } from '../../system/command'; -import { debug } from '../../system/decorators/log'; +import { debug, getLogScope } from '../../system/decorators/log'; import type { Deferrable } from '../../system/function'; import { debounce } from '../../system/function'; import { getSettledValue } from '../../system/promise'; import type { Serialized } from '../../system/serialize'; import { serialize } from '../../system/serialize'; +import { Stopwatch } from '../../system/stopwatch'; import type { LinesChangeEvent } from '../../trackers/lineTracker'; import { CommitFileNode } from '../../views/nodes/commitFileNode'; import { CommitNode } from '../../views/nodes/commitNode'; @@ -488,19 +490,32 @@ export class CommitDetailsWebviewView extends WebviewViewBase { + this._counter++; + + const sw = new Stopwatch(scope); + + Logger.warn(scope, `notifyDidChangeState(${this._counter}) starting...`); const success = await this.notify(DidChangeStateNotificationType, { state: await this.getState(context), }); + + sw.stop(); + + Logger.warn(scope, `notifyDidChangeState(${this._counter}) ended after ${sw.elapsed()}ms`); if (success) { this._context = context; this._pendingContext = undefined; @@ -626,10 +641,6 @@ export class CommitDetailsWebviewView extends WebviewViewBase