Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use same UNC path normalization logic with libuv #306

Conversation

sapphi-red
Copy link
Contributor

fixes #295

src/file_system.rs Outdated Show resolved Hide resolved
@Boshen
Copy link
Member

Boshen commented Nov 12, 2024

Requesting @Brooooooklyn because I don't know anything about windows.

Copy link

codspeed-hq bot commented Nov 12, 2024

CodSpeed Performance Report

Merging #306 will not alter performance

Comparing sapphi-red:fix/use-same-unc-path-normalization-logic-with-libuv (c8e2b09) with main (ebc6c36)

Summary

✅ 3 untouched benchmarks

@Boshen Boshen self-assigned this Nov 12, 2024
src/file_system.rs Outdated Show resolved Hide resolved
@Brooooooklyn
Copy link
Member

@sapphi-red Please wait a moment while I verify if this custom canonicalize implementation is truly optimized on Windows

@sapphi-red
Copy link
Contributor Author

sapphi-red commented Nov 13, 2024

@Brooooooklyn It seems cargo bench is slower on my machine.
Before (without sapphi-red#1)

resolver/single-thread  time:   [143.72 µs 148.36 µs 154.09 µs]
Found 8 outliers among 100 measurements (8.00%)
  2 (2.00%) high mild
  6 (6.00%) high severe
resolver/multi-thread   time:   [117.85 µs 119.70 µs 121.46 µs]
Found 7 outliers among 100 measurements (7.00%)
  4 (4.00%) high mild
  3 (3.00%) high severe
Benchmarking resolver/resolve from symlinks: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 301.3s, or reduce sample count to 10.
resolver/resolve from symlinks
                        time:   [2.9440 s 2.9456 s 2.9473 s]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

After (with sapphi-red#1)

resolver/single-thread  time:   [139.14 µs 144.00 µs 151.83 µs]
                        change: [−20.919% −3.8025% +16.565%] (p = 0.71 > 0.05)
                        No change in performance detected.
Found 12 outliers among 100 measurements (12.00%)
  4 (4.00%) high mild
  8 (8.00%) high severe
resolver/multi-thread   time:   [112.48 µs 114.09 µs 115.69 µs]
                        change: [−7.9616% −2.9621% +2.4978%] (p = 0.29 > 0.05)
                        No change in performance detected.
Found 5 outliers among 100 measurements (5.00%)
  1 (1.00%) high mild
  4 (4.00%) high severe
Benchmarking resolver/resolve from symlinks: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 743.3s, or reduce sample count to 10.
resolver/resolve from symlinks
                        time:   [7.4256 s 7.4356 s 7.4479 s]
                        change: [+152.08% +152.43% +152.85%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 5 outliers among 100 measurements (5.00%)
  1 (1.00%) high mild
  4 (4.00%) high severe

@Brooooooklyn
Copy link
Member

it seems cargo bench is slower on my machine.

Me too, It seems that we can simply use node_compatible_raw_canonicalize(fs::canonicalize(&path)) under Windows.

@sapphi-red
Copy link
Contributor Author

I reverted some code to use fs::canonicalize for Windows.

@Boshen
Copy link
Member

Boshen commented Nov 13, 2024

Please let me know when ready to merge.

@sapphi-red
Copy link
Contributor Author

It's ready to merge 👍

@Boshen Boshen merged commit 7b746d4 into oxc-project:main Nov 13, 2024
18 checks passed
@Boshen Boshen mentioned this pull request Nov 13, 2024
@sapphi-red sapphi-red deleted the fix/use-same-unc-path-normalization-logic-with-libuv branch November 13, 2024 10:34
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.

Resolving symlinked long path on Windows returns a DOS device path
3 participants