@@ -5,7 +5,7 @@ import { inject, injectable } from 'inversify';
5
5
import { CancellationToken , Disposable , Progress , ProgressLocation , window } from 'vscode' ;
6
6
import { IExtensionSyncActivationService } from '../activation/types' ;
7
7
import { raceCancellation } from '../common/cancellation' ;
8
- import { dispose } from '../common/utils/lifecycle' ;
8
+ import { DisposableStore , dispose } from '../common/utils/lifecycle' ;
9
9
import { IDisposable , IDisposableRegistry , Resource } from '../common/types' ;
10
10
import { createDeferred } from '../common/utils/async' ;
11
11
import { noop } from '../common/utils/misc' ;
@@ -86,8 +86,15 @@ export class KernelProgressReporter implements IExtensionSyncActivationService {
86
86
if ( ! KernelProgressReporter . instance ) {
87
87
return cb ( ) ;
88
88
}
89
- const progress = KernelProgressReporter . reportProgressInternal ( key , title ) ;
90
- return cb ( ) . finally ( ( ) => progress ?. dispose ( ) ) ;
89
+ const store = new DisposableStore ( ) ;
90
+ // Always wait 2s before showing any progress reporter (else we end up with too much noise).
91
+ const timeout = setTimeout ( ( ) => {
92
+ if ( ! store . isDisposed ) {
93
+ store . add ( KernelProgressReporter . reportProgressInternal ( key , title ) ) ;
94
+ }
95
+ } , 2_000 ) ;
96
+ store . add ( new Disposable ( ( ) => clearTimeout ( timeout ) ) ) ;
97
+ return cb ( ) . finally ( ( ) => store . dispose ( ) ) ;
91
98
}
92
99
93
100
/**
0 commit comments