fix(extHostProgress): throttle instead of debounce (#86161)

fix #86131
This commit is contained in:
Andy Edwards
2019-12-09 05:11:11 -06:00
committed by Benjamin Pasero
parent 7185c6f34a
commit e0639de665
3 changed files with 99 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ import { ProgressLocation } from './extHostTypeConverters';
import { Progress, IProgressStep } from 'vs/platform/progress/common/progress';
import { localize } from 'vs/nls';
import { CancellationTokenSource, CancellationToken } from 'vs/base/common/cancellation';
import { debounce } from 'vs/base/common/decorators';
import { throttle } from 'vs/base/common/decorators';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
export class ExtHostProgress implements ExtHostProgressShape {
@@ -85,7 +85,7 @@ class ProgressCallback extends Progress<IProgressStep> {
super(p => this.throttledReport(p));
}
@debounce(100, (result: IProgressStep, currentValue: IProgressStep) => mergeProgress(result, currentValue), () => Object.create(null))
@throttle(100, (result: IProgressStep, currentValue: IProgressStep) => mergeProgress(result, currentValue), () => Object.create(null))
throttledReport(p: IProgressStep): void {
this._proxy.$progressReport(this._handle, p);
}