deno/ext
Nathan Whitaker c22d17824b
perf(fs): don't canonicalize path when opening file if --allow-all is passed (#28716)
Fixes #28702.

Super artificial benchmark:

```ts
const perf = performance;

async function asyncOpen() {
  const start = perf.now();
  for (let i = 0; i < 100_000; i++) {
    const file = await Deno.open("./foo.txt");
    file.close();
  }
  const end = perf.now();
  console.log(end - start);
}

function syncOpen() {
  const start = perf.now();
  for (let i = 0; i < 100_000; i++) {
    const file = Deno.openSync("./foo.txt");
    file.close();
  }
  const end = perf.now();
  console.log(end - start);
}

if (Deno.args[0]?.trim() === "async") {
  await asyncOpen();
} else {
  syncOpen();
}
```

Results (average of 10 for each):

```
deno sync               1785.59
deno-this-pr sync       491.69
deno async              1839.71
deno-this-pr async      528.78
```

---------

Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2025-04-29 23:16:24 +00:00
..
broadcast_channel feat: use new feature checker (#29091) 2025-04-29 17:18:14 +02:00
cache feat: allow forcing in-memory SQLite dbs (#29026) 2025-04-28 09:06:38 +00:00
canvas chore: forward v2.2.12 release commit to main (#29044) 2025-04-24 20:22:57 -04:00
console chore: forward v2.2.12 release commit to main (#29044) 2025-04-24 20:22:57 -04:00
cron feat: use new feature checker (#29091) 2025-04-29 17:18:14 +02:00
crypto chore: forward v2.2.12 release commit to main (#29044) 2025-04-24 20:22:57 -04:00
fetch perf(fs): don't canonicalize path when opening file if --allow-all is passed (#28716) 2025-04-29 23:16:24 +00:00
ffi chore: forward v2.2.12 release commit to main (#29044) 2025-04-24 20:22:57 -04:00
fs perf(fs): don't canonicalize path when opening file if --allow-all is passed (#28716) 2025-04-29 23:16:24 +00:00
http feat(ext/http): Show that is also listening on localhost (#28171) 2025-04-25 08:36:20 +00:00
io chore: forward v2.2.12 release commit to main (#29044) 2025-04-24 20:22:57 -04:00
kv perf(fs): don't canonicalize path when opening file if --allow-all is passed (#28716) 2025-04-29 23:16:24 +00:00
napi chore: forward v2.2.12 release commit to main (#29044) 2025-04-24 20:22:57 -04:00
net perf(fs): don't canonicalize path when opening file if --allow-all is passed (#28716) 2025-04-29 23:16:24 +00:00
node perf(fs): don't canonicalize path when opening file if --allow-all is passed (#28716) 2025-04-29 23:16:24 +00:00
os feat: Allow access to NO_COLOR env var without --allow-env (#29090) 2025-04-29 10:12:48 -04:00
process chore: forward v2.2.12 release commit to main (#29044) 2025-04-24 20:22:57 -04:00
rt_helper feat(compile): support for ffi and node native addons (#28934) 2025-04-17 16:01:12 -04:00
telemetry fix: move otel logic into otel (#29073) 2025-04-28 15:09:15 +02:00
tls chore: forward v2.2.12 release commit to main (#29044) 2025-04-24 20:22:57 -04:00
url feat: deno_core 0.344.0 (#29089) 2025-04-29 13:15:08 +02:00
web feat: deno_core 0.344.0 (#29089) 2025-04-29 13:15:08 +02:00
webgpu chore: forward v2.2.12 release commit to main (#29044) 2025-04-24 20:22:57 -04:00
webidl feat: deno_core 0.344.0 (#29089) 2025-04-29 13:15:08 +02:00
websocket chore: forward v2.2.12 release commit to main (#29044) 2025-04-24 20:22:57 -04:00
webstorage chore: forward v2.2.12 release commit to main (#29044) 2025-04-24 20:22:57 -04:00