fix(core): show performance report recommendations only when actionable - #36344
Merged
Conversation
- Skip all recommendations when the run took under 30s (already fast) - Drop critical-path tasks under 20% of the path from the speed-up list - Never recommend Nx Cloud (remote cache CTA, Nx Agents) when the workspace opted out via neverConnectToCloud / NX_NO_CLOUD - Strip the Recommendations section in e2e report normalization so fast e2e runs (no recs) and slow ones (recs reappear) snapshot identically
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit e797dec
☁️ Nx Cloud last updated this comment at |
Contributor
There was a problem hiding this comment.
Nx Cloud has identified a flaky task in your failed CI:
🔂 Since the failure was identified as flaky, we triggered a CI rerun by adding an empty commit to this branch.
🎓 Learn more about Self-Healing CI on nx.dev
…le [Self-Healing CI Rerun]
AgentEnder
approved these changes
Jul 14, 2026
FrozenPandaz
added a commit
that referenced
this pull request
Jul 20, 2026
…le (#36344) ## Current Behavior The performance report prints recommendations on every run, no matter how fast the run was — a 2-second run can be told to increase parallelism, set up remote caching, or split its longest tasks. The "Speed up or split the longest tasks on the critical path" list includes tasks that barely contribute to the path (a task that is 5% of the path is listed alongside one that is 75%). And workspaces that opted out of Nx Cloud via `neverConnectToCloud` (or `NX_NO_CLOUD`) still get Nx Cloud recommendations — in fact the opt-out makes the remote-cache CTA *more* likely, because `isNxCloudUsed()` returning false looks like "cold cache with no remote → recommend Nx Cloud". ## Expected Behavior Recommendations only appear when they are actionable: - Runs under 30 seconds show stats only — no recommendations (terminal report, GitHub Actions job summary, and TUI popup alike). - The critical-path speed-up list only includes tasks that are at least 20% of the critical path; shorter tasks are noise, not speed-up targets. - Workspaces with `neverConnectToCloud` / `NX_NO_CLOUD` set never see the Nx Cloud recommendations (the remote-cache CTA and "Distribute across machines with Nx Agents"). Local advice (raise `--parallel`, drop `--skip-nx-cache`, speed up the longest tasks) still appears. The e2e report normalizer now strips the Recommendations section (and the release/lerna snapshots drop it), so snapshots stay stable whether a run finishes under or over the 30s floor. ## Related Issue(s) N/A <!-- polygraph-session-start --> --- [View session information ↗](https://app.trypolygraph.com/orgs/6a061dcb561c062131116eca/sessions/Performance-report-only-show-actionable-recommendations-d9fb2765) <!-- polygraph-session-end --> --------- Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com> (cherry picked from commit f00e9a8)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
The performance report prints recommendations on every run, no matter how fast the run was — a 2-second run can be told to increase parallelism, set up remote caching, or split its longest tasks. The "Speed up or split the longest tasks on the critical path" list includes tasks that barely contribute to the path (a task that is 5% of the path is listed alongside one that is 75%). And workspaces that opted out of Nx Cloud via
neverConnectToCloud(orNX_NO_CLOUD) still get Nx Cloud recommendations — in fact the opt-out makes the remote-cache CTA more likely, becauseisNxCloudUsed()returning false looks like "cold cache with no remote → recommend Nx Cloud".Expected Behavior
Recommendations only appear when they are actionable:
neverConnectToCloud/NX_NO_CLOUDset never see the Nx Cloud recommendations (the remote-cache CTA and "Distribute across machines with Nx Agents"). Local advice (raise--parallel, drop--skip-nx-cache, speed up the longest tasks) still appears.The e2e report normalizer now strips the Recommendations section (and the release/lerna snapshots drop it), so snapshots stay stable whether a run finishes under or over the 30s floor.
Related Issue(s)
N/A
View session information ↗