Skip to content

Comments

feat(plugin_timings): add 3s threshold and doc link to warning message#7741

Merged
shulaoda merged 1 commit intomainfrom
01-04-refactor_plugin_timings_add_3s_threshold_and_doc_link_to_warning_message
Jan 7, 2026
Merged

feat(plugin_timings): add 3s threshold and doc link to warning message#7741
shulaoda merged 1 commit intomainfrom
01-04-refactor_plugin_timings_add_3s_threshold_and_doc_link_to_warning_message

Conversation

@shulaoda
Copy link
Member

@shulaoda shulaoda commented Jan 4, 2026

closes #7559

Copy link
Member Author

shulaoda commented Jan 4, 2026


How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@shulaoda shulaoda requested a review from sapphi-red January 4, 2026 10:01
@shulaoda shulaoda marked this pull request as ready for review January 4, 2026 10:02
Copilot AI review requested due to automatic review settings January 4, 2026 10:02
@netlify
Copy link

netlify bot commented Jan 4, 2026

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 90adda5
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/695ded1b3822d50008015baa
😎 Deploy Preview https://deploy-preview-7741--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the plugin timing warning system by adding a 3-second minimum build time threshold to reduce noise from fast builds and improving user guidance by adding documentation links to warning messages.

Key Changes:

  • Added a 3-second minimum threshold before triggering plugin timing warnings to avoid false positives on quick builds
  • Enhanced warning messages with a direct link to documentation for more details
  • Updated documentation to reflect the new threshold requirement

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
docs/options/checks.md Documents the new 3-second minimum build time requirement as the first step in the detection process
crates/rolldown_plugin/src/types/hook_timing.rs Implements the 3-second threshold check using MIN_BUILD_TIME_MICROS constant in the plugins_are_slow() function
crates/rolldown_error/src/build_diagnostic/events/plugin_timings.rs Adds documentation link constant and updates warning messages to reference it, simplifies single-plugin message format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2026

Benchmarks Rust

  • target: main(fe2142b)
  • pr: 01-04-refactor_plugin_timings_add_3s_threshold_and_doc_link_to_warning_message(90adda5)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.15     72.4±1.77ms        ? ?/sec    1.00     63.1±5.37ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.16     79.3±1.36ms        ? ?/sec    1.00     68.1±1.60ms        ? ?/sec
bundle/bundle@rome_ts                                        1.07    111.6±2.88ms        ? ?/sec    1.00    103.9±1.36ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.08    124.3±1.97ms        ? ?/sec    1.00    115.2±1.51ms        ? ?/sec
bundle/bundle@threejs                                        1.08     39.6±1.03ms        ? ?/sec    1.00     36.6±0.64ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.06     44.3±0.59ms        ? ?/sec    1.00     41.6±0.62ms        ? ?/sec
bundle/bundle@threejs10x                                     1.06    406.9±7.30ms        ? ?/sec    1.00    383.9±4.45ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.02    460.3±5.43ms        ? ?/sec    1.00    449.8±5.96ms        ? ?/sec
scan/scan@rome_ts                                            1.00     82.4±1.53ms        ? ?/sec    1.04     86.1±2.29ms        ? ?/sec
scan/scan@threejs                                            1.00     28.3±1.65ms        ? ?/sec    1.02     28.7±0.54ms        ? ?/sec
scan/scan@threejs10x                                         1.00    286.6±4.63ms        ? ?/sec    1.01    290.3±4.81ms        ? ?/sec

Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add this one?

  • No warnings if the time spent in a specific plugin is <1s

@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 7, 2026

Merge activity

@sapphi-red sapphi-red changed the title refactor(plugin_timings): add 3s threshold and doc link to warning message feat(plugin_timings): add 3s threshold and doc link to warning message Jan 7, 2026
@graphite-app graphite-app bot force-pushed the 01-04-refactor_plugin_timings_add_3s_threshold_and_doc_link_to_warning_message branch from 83659e9 to e1b8151 Compare January 7, 2026 05:15
Copilot AI review requested due to automatic review settings January 7, 2026 05:20
@graphite-app graphite-app bot force-pushed the 01-04-refactor_plugin_timings_add_3s_threshold_and_doc_link_to_warning_message branch from e1b8151 to 90adda5 Compare January 7, 2026 05:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@shulaoda
Copy link
Member Author

shulaoda commented Jan 7, 2026

Can we also add this one?

  • No warnings if the time spent in a specific plugin is <1s

I’m thinking that if a plugin uses the renderChunk hook, then 0.9s already accounts for roughly one third of the minimum build time of 3s, which would clearly meet the criteria for a slow plugin. However, for concurrent hooks such as transform or resolveId, a reported duration of 4s may represent aggregated CPU time, while the actual wall-clock time could be well under 1s.

@shulaoda shulaoda merged commit 71d8ce0 into main Jan 7, 2026
35 checks passed
@shulaoda shulaoda deleted the 01-04-refactor_plugin_timings_add_3s_threshold_and_doc_link_to_warning_message branch January 7, 2026 07:36
@sapphi-red
Copy link
Member

We may have more warning than ideal, but we won't have less warning, so I think it's fine to have it.

shulaoda added a commit that referenced this pull request Jan 7, 2026
…timing warnings (#7785)

Can we also add this one?

> - No warnings if the time spent in a specific plugin is <1s

_Originally posted by @sapphi-red in
#7741 (review)
@github-actions github-actions bot mentioned this pull request Jan 7, 2026
shulaoda added a commit that referenced this pull request Jan 7, 2026
## [1.0.0-beta.59] - 2026-01-07

⚡ Inline Dynamic Imports for Statically Imported Modules

- When a module is already statically imported, dynamic imports to that same module are now inlined instead of creating a separate chunk

### 🚀 Features

- plugin_timings: add 3s threshold and doc link to warning message (#7741) by @shulaoda
- improve treeshaking logic to handle empty parameter list in dynamic import .then() callbacks (#7781) by @Copilot
- dev/lazy: don't include already executed modules (#7745) by @hyf0
- dev/lazy: support dynamic `import(..)` (#7726) by @hyf0
- inline dynamic imports that imports statically imported modules (#7742) by @IWANABETHATGUY
- option: add experimental option to control chunk optimization (#7738) by @IWANABETHATGUY

### 🐛 Bug Fixes

- inline dynamic entry to user defined entry with esm wrap kind (#7783) by @IWANABETHATGUY
- use canonical namespace reference for property access (#7777) by @IWANABETHATGUY
- dynamic entry merged into common chunk with cjs and esm wrap kind (#7771) by @IWANABETHATGUY
- tla: should not await non-tla-related modules (#7768) by @hyf0
- dynamic entry captured by common chunk with CJS format (#7757) by @IWANABETHATGUY
- module_loader: mark emitted chunks as user-defined entry when already loaded (#7765) by @shulaoda
- normalize preserveModulesRoot path (#7737) by @IWANABETHATGUY
- linker: resolve race condition in side effects computation for export-star (#7728) by @camc314

### 🚜 Refactor

- plugin_timings: filter out plugins with duration < 1s from timing warnings (#7785) by @shulaoda
- module_loader: remove unnecessary collect before extend (#7769) by @shulaoda
- rename _id suffixes to _idx for oxc_index types (#7767) by @IWANABETHATGUY
- remove duplicate `preserve_entry_signatures` from `AddEntryModuleMsg` (#7762) by @shulaoda
- module_loader: pass `user_defined_entries` by reference (#7756) by @shulaoda
- dev/lazy: get proxy entry's `ResolvedId` correctly (#7746) by @hyf0
- simplify try_rewrite_import_expression control flow (#7753) by @IWANABETHATGUY
- module_loader: remove unnecessary dynamic import handling for runtime module (#7754) by @shulaoda
- inline __toDynamicImportESM  (#7747) by @IWANABETHATGUY
- use From impl for ModuleLoaderOutput conversion (#7732) by @shulaoda
- remove duplicate fields from `ModuleLoader` (#7731) by @shulaoda
- tweak `resolve_user_defined_entries` (#7727) by @shulaoda

### 📚 Documentation

- add rolldown-string reference to native MagicString compatibility section (#7778) by @Copilot
- improve comments for export star side effects handling (#7730) by @IWANABETHATGUY

### 🧪 Testing

- use assertion instead of console.log for some testcase (#7744) by @IWANABETHATGUY

### ⚙️ Miscellaneous Tasks

- tweak some `output.dynamicImportInCjs` related rollup test results (#7776) by @sapphi-red
- mark esbuild/dce/dce_of_symbol_ctor_call as passed (#7775) by @sapphi-red
- deps: update oxc apps (#7772) by @renovate[bot]
- vite-tests: allow running on PRs with `test: vite-tests` label (#7770) by @shulaoda
- deps: update oxc apps (#7760) by @renovate[bot]
- deps: update rollup submodule for tests to v4.55.1 (#7763) by @sapphi-red
- deps: update test262 submodule for tests (#7764) by @sapphi-red
- deps: update oxc to v0.107.0 (#7758) by @camc314
- deps: update taiki-e/install-action action to v2.65.13 (#7751) by @renovate[bot]
- deps: update rust crates (#7750) by @renovate[bot]
- deps: update npm packages (#7749) by @renovate[bot]
- deps: update github-actions (#7748) by @renovate[bot]
- deps: update dependency oxlint-tsgolint to v0.10.1 (#7729) by @renovate[bot]
- deps: update crate-ci/typos action to v1.41.0 (#7725) by @renovate[bot]

Co-authored-by: shulaoda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adjust plugin timing warning

2 participants