Skip to content

feat(minifier): return total number of iterations for debugging#12995

Merged
graphite-app[bot] merged 1 commit intomainfrom
08-11-feat_minifier_return_total_number_of_iterations_for_debugging
Aug 11, 2025
Merged

feat(minifier): return total number of iterations for debugging#12995
graphite-app[bot] merged 1 commit intomainfrom
08-11-feat_minifier_return_total_number_of_iterations_for_debugging

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Aug 11, 2025

No description provided.

Copilot AI review requested due to automatic review settings August 11, 2025 15:03
@github-actions github-actions bot added A-minifier Area - Minifier C-enhancement Category - New feature or request labels Aug 11, 2025
Copy link
Member Author

Boshen commented Aug 11, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

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 adds debugging functionality to the minifier by tracking and returning the total number of iterations performed during the minification process. This information is displayed in the minsize benchmark output to help identify performance issues.

  • Modifies the minifier API to return iteration count alongside the minified code
  • Updates the benchmark table format to include an "Iterations" column
  • Threads the iteration count through the minification pipeline from peephole optimizations to the final output

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tasks/minsize/src/lib.rs Updates minification functions to return iteration counts and modifies output table format
tasks/minsize/minsize.snap Updates snapshot test to reflect new table format with iterations column
crates/oxc_minifier/src/peephole/mod.rs Modifies run_in_loop to return the number of iterations performed
crates/oxc_minifier/src/lib.rs Updates MinifierReturn struct to include iterations field and threads it through the build process
crates/oxc_minifier/src/compressor.rs Updates build_with_scoping to return iteration count from peephole optimizations

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 11, 2025

CodSpeed Instrumentation Performance Report

Merging #12995 will not alter performance

Comparing 08-11-feat_minifier_return_total_number_of_iterations_for_debugging (7b9a781) with main (d3ba782)

Summary

✅ 34 untouched benchmarks

@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 11, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 08-11-feat_minifier_return_total_number_of_iterations_for_debugging branch from 3e71d2d to 7b9a781 Compare August 11, 2025 15:51
@graphite-app graphite-app bot merged commit 7b9a781 into main Aug 11, 2025
30 checks passed
@graphite-app graphite-app bot deleted the 08-11-feat_minifier_return_total_number_of_iterations_for_debugging branch August 11, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-minifier Area - Minifier C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants