Skip to content

Commit

Permalink
Tweak logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Dec 6, 2022
1 parent dec3791 commit 650cda3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/TaskQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ abstract class TaskQueue implements ITaskQueue {
if (longestTask * 1.5 > deadlineRemaining) {
// Warn when the time exceeding the deadline is over 20ms, if this happens in practice the
// task should be split into sub-tasks to ensure the UI remains responsive.
if (lastDeadlineRemaining - taskDuration < -5) {
console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(lastDeadlineRemaining - taskDuration))}ms`, { stacktrace: new Error().stack });
if (lastDeadlineRemaining - taskDuration < -20) {
console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(lastDeadlineRemaining - taskDuration))}ms`);
}
this._start();
return;
Expand Down

0 comments on commit 650cda3

Please sign in to comment.