Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Console log warning when formatting takes too long that formatonsave …
Browse files Browse the repository at this point in the history
…could be aborted #1419
  • Loading branch information
ramya-rao-a committed Jan 3, 2018
1 parent e0a8e40 commit 542f838
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/goFormat.ts
Expand Up @@ -63,6 +63,9 @@ export class Formatter {
}
*/
sendTelemetryEvent('format', { tool: formatTool }, { timeTaken });
if (timeTaken > 750) {
console.log(`Formatting took too long(${timeTaken}ms). Format On Save feature could be aborted.`);
}
return resolve(textEdits);
});
p.stdin.end(document.getText());
Expand Down

0 comments on commit 542f838

Please sign in to comment.