Motivation
Looking at the runTasks function, there is some room for improvement on systems that have multiple cores. Tasks could be threaded off using something like https://www.npmjs.com/package/piscina.
|
async runTasks(): Promise<[TaskResult[], TaskError[]]> { |
|
let results = await this.eachTask(async (task: Task) => { |
|
let result; |
|
this.debug('start %s run', task.constructor.name); |
|
|
|
try { |
|
result = await task.run(); |
|
} catch (error) { |
|
this.addError(task.meta.taskName, error.message); |
|
} |
|
|
|
this.debug('%s run done', task.constructor.name); |
|
return result; |
|
}); |
|
|
|
return [(results.filter(Boolean) as TaskResult[]).sort(taskResultComparator), this._errors]; |
|
} |
Motivation
Looking at the runTasks function, there is some room for improvement on systems that have multiple cores. Tasks could be threaded off using something like https://www.npmjs.com/package/piscina.
checkup/packages/cli/src/task-list.ts
Lines 97 to 113 in a11f17c