Skip to content

Conversation

@leaysgur
Copy link
Member

Fixes #13836

Copilot AI review requested due to automatic review settings September 17, 2025 02:24
@github-actions github-actions bot added the C-performance Category - Solution not expected to change functional behavior, only performance label Sep 17, 2025
Copy link
Member Author

leaysgur commented Sep 17, 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 pull request refactors the oxfmt formatter to walk and format files simultaneously for better performance. Instead of collecting all file paths first and then processing them, the code now streams file entries through a channel as they are discovered and processes them immediately.

Key changes:

  • Replaced batch collection with streaming via channels for immediate processing
  • Modified the walk system to send individual entries instead of batched vectors
  • Updated file counting logic to work with the streaming approach

Reviewed Changes

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

File Description
apps/oxfmt/src/walk.rs Refactored to stream individual entries through channels instead of collecting batches
apps/oxfmt/src/service.rs Updated to process streaming entries and removed batch-based entry management
apps/oxfmt/src/format.rs Modified to handle streaming workflow and moved file counting to after processing
apps/oxfmt/tests/snapshots/... Updated test snapshots to reflect new output format with "Checking formatting..." message

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@leaysgur leaysgur force-pushed the 09-17-perf_oxfmt_walk_and_format_at_the_same_time branch from 50267e7 to e21e1bc Compare September 17, 2025 02:26
@leaysgur leaysgur marked this pull request as draft September 17, 2025 02:27
@leaysgur leaysgur force-pushed the 09-17-perf_oxfmt_walk_and_format_at_the_same_time branch from e21e1bc to 9372709 Compare September 17, 2025 03:44
@leaysgur leaysgur marked this pull request as ready for review September 17, 2025 04:00
@leaysgur leaysgur requested a review from Dunqing September 17, 2025 04:03
@leaysgur leaysgur force-pushed the 09-17-perf_oxfmt_walk_and_format_at_the_same_time branch from 9372709 to 7b5d081 Compare September 17, 2025 04:08
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Sep 18, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 18, 2025

Merge activity

  • Sep 18, 2:03 PM UTC: Dunqing added this pull request to the Graphite merge queue.
  • Sep 18, 2:15 PM UTC: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Test NAPI').
  • Sep 18, 3:39 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Sep 19, 12:30 AM UTC: Boshen added this pull request to the Graphite merge queue.
  • Sep 19, 12:36 AM UTC: Merged by the Graphite merge queue.

graphite-app bot pushed a commit that referenced this pull request Sep 18, 2025
@graphite-app graphite-app bot force-pushed the 09-17-perf_oxfmt_walk_and_format_at_the_same_time branch from 7b5d081 to 4b031e9 Compare September 18, 2025 14:04
@github-actions github-actions bot added A-cli Area - CLI A-formatter Area - Formatter labels Sep 18, 2025
graphite-app bot pushed a commit that referenced this pull request Sep 18, 2025
@graphite-app graphite-app bot force-pushed the 09-17-perf_oxfmt_walk_and_format_at_the_same_time branch from 4b031e9 to 15f8f40 Compare September 18, 2025 14:08
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Sep 18, 2025
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Sep 18, 2025
@graphite-app graphite-app bot force-pushed the 09-17-perf_oxfmt_walk_and_format_at_the_same_time branch from 0918d44 to 59db021 Compare September 19, 2025 00:31
@graphite-app graphite-app bot merged commit 59db021 into main Sep 19, 2025
17 checks passed
@graphite-app graphite-app bot deleted the 09-17-perf_oxfmt_walk_and_format_at_the_same_time branch September 19, 2025 00:36
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Sep 19, 2025
This was referenced Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-formatter Area - Formatter C-performance Category - Solution not expected to change functional behavior, only performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oxfmt: walk and format at the same time, instead of walk, collect paths then format

4 participants