Skip to content

perf: batch path changes via PathsMut on Windows#94

Merged
sapphi-red merged 1 commit into
mainfrom
perf/batch-path-changes-with-pathsmut-on-windows
May 19, 2026
Merged

perf: batch path changes via PathsMut on Windows#94
sapphi-red merged 1 commit into
mainfrom
perf/batch-path-changes-with-pathsmut-on-windows

Conversation

@sapphi-red

Copy link
Copy Markdown
Member

Implement Watcher::paths_mut for the Windows backend so that bulk add/remove operations cross the server-thread channel as a single Action::StageAndCommit message instead of N Action::Watch/Action::Unwatch messages with N acks. Each staged change still goes through the existing per-path add_watch/remove_watch, so individual semantics and the event filter are unchanged.

Cuts ~27-37% off the windows_paths_mut bench at 100-1000 paths by amortizing the channel round-trip across the batch.

windows_paths_mut/nonrecursive/100
                        time:   [2.1099 ms 2.1233 ms 2.1366 ms]
                        change: [−33.148% −31.854% −30.649%] (p = 0.00 < 0.05)
                        Performance has improved.
windows_paths_mut/recursive/100
                        time:   [2.2734 ms 2.2883 ms 2.3029 ms]
                        change: [−31.250% −29.819% −28.525%] (p = 0.00 < 0.05)
                        Performance has improved.
windows_paths_mut/nonrecursive/500
                        time:   [9.3519 ms 9.3980 ms 9.4457 ms]
                        change: [−38.313% −37.085% −35.954%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild
windows_paths_mut/recursive/500
                        time:   [9.4852 ms 9.5319 ms 9.5815 ms]
                        change: [−39.030% −37.602% −36.251%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
  4 (4.00%) high mild
windows_paths_mut/nonrecursive/1000
                        time:   [18.885 ms 19.009 ms 19.141 ms]
                        change: [−37.947% −36.939% −35.987%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
  5 (5.00%) high mild
windows_paths_mut/recursive/1000
                        time:   [18.889 ms 18.998 ms 19.113 ms]
                        change: [−38.237% −37.280% −36.434%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
  7 (7.00%) high mild

Implement `Watcher::paths_mut` for the Windows backend so that bulk
add/remove operations cross the server-thread channel as a single
`Action::StageAndCommit` message instead of N `Action::Watch`/`Action::Unwatch`
messages with N acks. Each staged change still goes through the existing
per-path `add_watch`/`remove_watch`, so individual semantics and the
event filter are unchanged.

Cuts ~27-37% off the `windows_paths_mut` bench at 100-1000 paths by
amortizing the channel round-trip across the batch.
@sapphi-red sapphi-red merged commit aba6e5c into main May 19, 2026
12 checks passed
@sapphi-red sapphi-red deleted the perf/batch-path-changes-with-pathsmut-on-windows branch May 19, 2026 10:51
@rolldown-guard rolldown-guard Bot mentioned this pull request May 19, 2026
sapphi-red pushed a commit that referenced this pull request May 20, 2026
## 🤖 New release

* `rolldown-notify`: 10.3.1 -> 10.4.0 (✓ API compatible changes)
* `rolldown-notify-debouncer-mini`: 0.8.7 -> 0.8.8
* `rolldown-notify-debouncer-full`: 0.7.7 -> 0.7.8

<details><summary><i><b>Changelog</b></i></summary><p>

## `rolldown-notify`

<blockquote>

##
[10.4.0](rolldown-notify-v10.3.1...rolldown-notify-v10.4.0)
- 2026-05-20

### Added

- consolidate paths further more for fsevents backend if needed
([#91](#91))

### Other

- consolidate watch paths via `ConsolidatingPathTrie` on Windows
([#93](#93))
- batch path changes via `PathsMut` on Windows
([#94](#94))
</blockquote>

## `rolldown-notify-debouncer-mini`

<blockquote>

##
[0.8.8](rolldown-notify-debouncer-mini-v0.8.7...rolldown-notify-debouncer-mini-v0.8.8)
- 2026-05-20

### Other

- updated the following local packages: rolldown-notify
</blockquote>

## `rolldown-notify-debouncer-full`

<blockquote>

##
[0.7.8](rolldown-notify-debouncer-full-v0.7.7...rolldown-notify-debouncer-full-v0.7.8)
- 2026-05-20

### Other

- updated the following local packages: rolldown-notify
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: rolldown-guard[bot] <278280044+rolldown-guard[bot]@users.noreply.github.com>
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.

1 participant