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

Enabling PGO for Windows releases

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
node.js, powershell

調査の方向性

まず、issue に示されている Jenkins job のドラフトと現在の release コマンドを確認し、続いて pgo.ps1 と vcbuild.bat の PGO 引数を調査します。ドラフトの job を検証の基準として使用し、release ビルドが nightly で 3 つの PGO ステップを完了できる一方、nightly ビルドと canary ビルドでは非 PGO パスが維持されることを確認してください。

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

説明

ci-release jenkins platform:windows

I want to start a discussion about enabling PGO for release builds on Windows. Along with LTO (enabled since v26.3), it will further improve Node.js performance on Windows. While LTO builds took 3-3.5 hours initially, recent changes have reduced them to around 2 hours. Enabling PGO will double that time (2 builds are needed plus running workload scripts in between), but overall it will be a bit longer than what LTO took last week. Additionally, I would only enable PGO for release builds, so nightly and canary builds would be unaffected. I feel confident in enabling this because I've already tested it thoroughly in a draft job.

Since Jenkins changes are only visible after they are made, I want to share what I plan to change here before doing it. What we currently have is this:

vcbuild.bat build-release %ARCH% upload

and I would change it to this:

if not exist pgo.ps1 goto :no-pgo
if not "%DISTTYPE%"=="release" goto :no-pgo

echo === PGO Build: Step 1 - Build instrumented binary ===
@REM In first PGO build, make x64 binary to generate profdata (Eventually we want to add ARM64 machines for this)
call vcbuild.bat build-release x64 pgo-generate
if errorlevel 1 exit /b %errorlevel%

echo === PGO Build: Step 2 - Run workload and collect profiles ===
powershell -NoProfile -ExecutionPolicy Bypass -File pgo.ps1 -PgoGenNode Release\node.exe -PhaseOnly
if errorlevel 1 exit /b %errorlevel%
echo --- Cleaning instrumented build ---
git clean -fdx -e node.profdata
if errorlevel 1 exit /b %errorlevel%

echo === PGO Build: Step 3 - Build optimized binary ===
call vcbuild.bat build-release %ARCH% pgo-use upload
exit /b %errorlevel%

:no-pgo
echo === Non-PGO Build ===
vcbuild.bat build-release %ARCH% upload

The script checks whether the Node.js being built has PGO enabled, and if so, it uses it for release builds. This way, if/when we backport PGO to LTS versions, they will pick it up for releases without any further changes in Jenkins.

As I've already stated, I tested this and feel confident about enabling it, but please feel free to share any concerns you might have about these changes.

主要言語
Jinja
スター
541
フォーク
185
平均マージ
2日 18時間
マージ済み PR(30日)
6

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

nodejs/build のほかの issue

nodejs/build の issue をすべて見る

似ている issue

Build System の issue をもっと見る

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

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