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(ext/node): stat.mode on windows #24434

Merged
merged 9 commits into from
Jul 18, 2024

Conversation

littledivy
Copy link
Member

Fixes #23984

ext/fs/Cargo.toml Outdated Show resolved Hide resolved
@littledivy

This comment was marked as resolved.

littledivy added a commit that referenced this pull request Jul 17, 2024
Use `access` on *nix and `GetFileAttributesW` on Windows.

[Benchmark](https://paste.divy.work/p/-gq8Ark.js):
```
$ deno run -A bench.mjs # main (568dd)
existsSync: 8980.636629ms

$ target/release/deno run -A bench.mjs # this PR
existsSync: 6448.7604519999995ms

$ bun bench.mjs
existsSync: 6562.88671ms

$ node bench.mjs
existsSync: 7740.064653ms
```

Ref #24434 (comment)
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, if @dsherret has no objections

@littledivy littledivy merged commit bf9c08b into denoland:main Jul 18, 2024
17 checks passed
@littledivy littledivy deleted the windows_mode_lstat branch July 18, 2024 02:49
bartlomieju pushed a commit that referenced this pull request Jul 22, 2024
Use `access` on *nix and `GetFileAttributesW` on Windows.

[Benchmark](https://paste.divy.work/p/-gq8Ark.js):
```
$ deno run -A bench.mjs # main (568dd)
existsSync: 8980.636629ms

$ target/release/deno run -A bench.mjs # this PR
existsSync: 6448.7604519999995ms

$ bun bench.mjs
existsSync: 6562.88671ms

$ node bench.mjs
existsSync: 7740.064653ms
```

Ref #24434 (comment)
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.

node compat: chokidar not work on windows
4 participants