Repository navigation
perf(minifier): reduce allocations when processing if statements - #26666
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
17ce2d9 to
88a6624
Compare
88a6624 to
a27579c
Compare
The Label PR workflow runs on `pull_request`, where `GITHUB_TOKEN` is read-only for PRs from forks, so it skips them and external PRs need area labels applied by hand (see #26666). `pull_request_target` would fix that but was banned in #21566. Trigger the labeler from `workflow_run` on `Check PR` instead. That event runs the workflow file from the default branch with a writable token and never checks out PR code. The PR number is resolved from the run's head branch through the API because `workflow_run.pull_requests` is empty for forks. `actions/labeler` reads `labeler.yml` at the default-branch sha and the changed files from the pull request API, so the PR only controls which paths it touches. `workflow_run` only fires from the default branch, so this cannot be exercised on the PR itself.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The Label PR workflow runs on `pull_request`, where the token is read-only for PRs from forks, so external PRs need area labels applied by hand (#26666 for example). `pull_request_target` was banned in #21566. Trigger the labeler from `workflow_run` on `Check PR` instead. The workflow file comes from the default branch, no PR code is checked out, and `actions/labeler` reads `labeler.yml` and the changed files through the API. The PR number is looked up by head branch and sha because `workflow_run.pull_requests` is empty for forks.
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The Label PR workflow runs on `pull_request`, where the token is read-only for PRs from forks, so external PRs need area labels applied by hand (#26666 for example). `pull_request_target` was banned in #21566. Trigger the labeler from `workflow_run` on `Check PR` instead. The workflow file comes from the default branch, no PR code is checked out, and `actions/labeler` reads `labeler.yml` and the changed files through the API. The PR number is looked up by head branch and sha because `workflow_run.pull_requests` is empty for forks.
### 🚀 Features - 1fac655 coverage: Support new TypeScript fixture layout (#26226) (camc314) ### 🐛 Bug Fixes - cd7228f minifier: Add missing negation for boolean literal (#26847) (Armano) - 32305e2 transformer: Skip enum reverse mappings for syntactic string initializers (#26724) (Dunqing) - 7811f0a parser: Preserve reparsed `await` tokens (#26619) (camc314) - 9220158 transformer: Skip recovered using loop patterns (#26722) (camc314) - 3130405 parser: Recover await using object binding patterns (#26721) (camc314) - 827fdbd parser: Reject invalid modifiers on import aliases (#26622) (camc314) ### ⚡ Performance - 3f1e3aa minifier: Preallocate stmts vec size to avoid excesive reallocs (#26856) (Armano) - bd3f69e semantic: Reuse identifier hashes in enum member lookups (#26773) (camc314) - 5f72954 minifier: Reduce allocations when processing if statements (#26666) (Armano)
replace_statement_withfor replacing stmts in placetry_minimize_ifrewrite statements to new statements in placeifstmt instead of recreating it inhandle_if_statement