Skip to content

Conversation

@GiveMe-A-Name
Copy link
Member

@GiveMe-A-Name GiveMe-A-Name commented Aug 22, 2025

Summary

This PR refactors the file system event handling architecture to support batch processing of FsEvents.

The batch event will so fast consume if user setting watchOptions.aggregateTimeout as zero.

We should batch processing associated_event by trigger finding. Otherwise it will trigger twice callback.

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings August 22, 2025 03:22
@netlify
Copy link

netlify bot commented Aug 22, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 5859eaa
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68a82153eacb1c00082aa1f8

@github-actions github-actions bot added release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack. labels Aug 22, 2025
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 updates the event handling system to support batch processing of file system events instead of processing them individually. The change modifies the channel communication to send vectors of FsEvent rather than single events.

  • Changes event channels from UnboundedSender<FsEvent> to UnboundedSender<Vec<FsEvent>>
  • Updates event processing logic to handle batched events
  • Modifies test assertions to work with the new batched event structure

Reviewed Changes

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

File Description
crates/rspack_fs/src/watcher/trigger.rs Updates trigger to send batched events and refactors event processing logic
crates/rspack_fs/src/watcher/scanner.rs Modifies scanner to send single events wrapped in vectors for consistency
crates/rspack_fs/src/watcher/executor.rs Updates executor to receive and process batched events

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

@GiveMe-A-Name GiveMe-A-Name changed the title fix: update event handling to support batch processing of fsEvents fix: update event handling to support batch processing of FsEvents Aug 22, 2025
@GiveMe-A-Name GiveMe-A-Name requested a review from 9aoy August 22, 2025 03:41
@github-actions
Copy link
Contributor

github-actions bot commented Aug 22, 2025

📦 Binary Size-limit

Comparing 5859eaa to fix: check force_build_deps target module is isolated (#11461) by jinrui

❌ Size increased by 768bytes from 47.60MB to 47.61MB (⬆️0.00%)

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 22, 2025

CodSpeed Performance Report

Merging #11460 will not alter performance

Comparing fix/native-wacher-emit-redundancy-event (5859eaa) with main (5cd6aaa)1

🎉 Hooray! codspeed-rust just leveled up to 2.7.2!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 17 untouched benchmarks

Footnotes

  1. No successful run was found on main (eb0352a) during the generation of this report, so 5cd6aaa was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@GiveMe-A-Name GiveMe-A-Name force-pushed the fix/native-wacher-emit-redundancy-event branch 2 times, most recently from d2d6e4b to 9492318 Compare August 22, 2025 06:53
@GiveMe-A-Name GiveMe-A-Name enabled auto-merge (squash) August 22, 2025 07:03
@GiveMe-A-Name GiveMe-A-Name disabled auto-merge August 22, 2025 08:04
@GiveMe-A-Name GiveMe-A-Name enabled auto-merge (squash) August 22, 2025 08:04
@GiveMe-A-Name GiveMe-A-Name disabled auto-merge August 22, 2025 08:04
@GiveMe-A-Name GiveMe-A-Name enabled auto-merge (squash) August 22, 2025 08:04
@GiveMe-A-Name GiveMe-A-Name merged commit b93f4d0 into main Aug 22, 2025
44 checks passed
@GiveMe-A-Name GiveMe-A-Name deleted the fix/native-wacher-emit-redundancy-event branch August 22, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants