vscode: reduce throttle latency of downloadFile() progress callback for smoother UX
This commit is contained in:
parent
9791b6a8de
commit
bdd88c2fad
@ -13,7 +13,7 @@ export async function downloadFile(
|
|||||||
destFilePath: fs.PathLike,
|
destFilePath: fs.PathLike,
|
||||||
onProgress: (readBytes: number, totalBytes: number) => void
|
onProgress: (readBytes: number, totalBytes: number) => void
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
onProgress = throttle(500, /* noTrailing: */ true, onProgress);
|
onProgress = throttle(200, /* noTrailing: */ true, onProgress);
|
||||||
|
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user