Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[rush] Improve task scheduler to handle tasks that consume 100% CPU

オープン
#5,607 コメント 7 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
node.js, typescript

調査の方向性

Start by tracing Rush's existing --parallelism and rush-project.json weight handling; the issue names no implementation file or test. Compare the two proposals: percentage weights should resolve against the parallelism limit, while a common/config rule should match package.json scripts and allow rush-project.json overrides.

索引モデルが issue の本文から書いたものです。

説明

Summary

@LPegasus and I recently discussed a problem where certain Rush phase scripts are heavily multithreaded, designed to consume 100% CPU. Examples:

  • ESBuild
  • Rspack
  • Jest

When Rush attempts to run several of these tasks in parallel, it overloads the machine. For ESBuild it was causing Golang deadlocks, perhaps due to an ESBuild bug that causes thread starvation. (?)

Details

This can be avoided by specifying weight=N in rush-project.json, where N is equal to the --parallelism limit. But if CI uses a value like --parallelism=100%, then N is machine dependent.

We can break this problem into two complementary design proposals:

Proposal 1: Allow % units for weight

The rush-project.json file should allow percentage values like "weight": "100%" similar to --parallelism=100%. For example if --parallelism=100% corresponds to a maximum of 8 parallel jobs, then "weight": "75%" would indicate a weight of 6.

Proposal 2: Allow weight to be specified using pattern matching

In order to use the "weight": "100%" feature, we would need to audit every operation script for every project in our monorepo, identify which ones are invoking ESBuild, and then add a corresponding rush-project.json or rig profile to adjust the weight.

However in practice, that work could be captured by a general rule like this:

Examine the package.json shell script: Does it match the RegExp /\besbuild\b/? If yes, then use "100%" as the default weight, unless it is overridden by rush-project.json.

Such a rule could be configured centrally in a common/config file.

@dmichon-msft

主要言語
TypeScript
スター
6.5k
フォーク
708
平均マージ
4日 13時間
マージ済み PR(30日)
62

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/rushstack のほかの issue

microsoft/rushstack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。