Skip to content

Make node:fs load lazily - #7021

Closed
Jarred-Sumner wants to merge 1 commit into
mainfrom
jarred/fs-lazy
Closed

Jarred-Sumner wants to merge 1 commit into
mainfrom
jarred/fs-lazy

Conversation

@Jarred-Sumner

@Jarred-Sumner Jarred-Sumner commented Nov 10, 2023 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

This makes node:fs load modules lazily. This also moves some Symbol.for usages into a shared internal/symbols module so we don't expose these APIs unintentionally.

After:

[1.29ms] require('fs')
[0.50ms] require('fs').StatWatcher

Before:

[7.31ms] require('fs')
[0.00ms] require('fs').StatWatcher

How did you verify your code works?

Existing tests

@github-actions

github-actions Bot commented Nov 10, 2023 •

Copy link
Copy Markdown
Contributor

❌ @Jarred-Sumner 10 files with test failures on bun-darwin-aarch64:

  • test/cli/install/bun-run.test.ts
  • test/cli/install/registry/bun-install-registry.test.ts
  • test/integration/next/default-pages-dir/test/dev-server.test.ts
  • test/integration/next/default-pages-dir/test/next-build.test.ts
  • test/js/bun/test/test-test.test.ts
  • test/js/bun/util/which.test.ts
  • test/js/node/fs/fs.test.ts
  • test/js/node/stream/node-stream.test.js
  • test/js/third_party/webpack/webpack.test.ts
  • test/js/web/fetch/fetch.stream.test.ts

View test output

#b6040e8956efe8a7867b0ef0ac418e18b745c4a8

@github-actions

github-actions Bot commented Nov 10, 2023 •

Copy link
Copy Markdown
Contributor

❌ @Jarred-Sumner 8 files with test failures on linux-x64-baseline:

  • test/cli/install/bun-run.test.ts
  • test/cli/install/registry/bun-install-registry.test.ts
  • test/integration/next/default-pages-dir/test/dev-server.test.ts
  • test/integration/next/default-pages-dir/test/next-build.test.ts
  • test/js/node/fs/fs.test.ts
  • test/js/node/stream/node-stream.test.js
  • test/js/third_party/webpack/webpack.test.ts
  • test/js/web/fetch/fetch.stream.test.ts

View test output

#b6040e8956efe8a7867b0ef0ac418e18b745c4a8

@github-actions

github-actions Bot commented Nov 10, 2023 •

Copy link
Copy Markdown
Contributor

❌ @Jarred-Sumner 9 files with test failures on linux-x64:

  • test/cli/install/bun-run.test.ts
  • test/cli/install/registry/bun-install-registry.test.ts
  • test/integration/next/default-pages-dir/test/dev-server.test.ts
  • test/integration/next/default-pages-dir/test/next-build.test.ts
  • test/js/node/fs/fs.test.ts
  • test/js/node/stream/node-stream.test.js
  • test/js/node/watch/fs.watch.test.ts
  • test/js/third_party/webpack/webpack.test.ts
  • test/js/web/fetch/fetch.stream.test.ts

View test output

#b6040e8956efe8a7867b0ef0ac418e18b745c4a8

@github-actions

github-actions Bot commented Nov 10, 2023 •

Copy link
Copy Markdown
Contributor

❌ @Jarred-Sumner 12 files with test failures on bun-darwin-x64-baseline:

  • test/cli/install/bun-run.test.ts
  • test/cli/install/registry/bun-install-registry.test.ts
  • test/integration/next/default-pages-dir/test/dev-server.test.ts
  • test/integration/next/default-pages-dir/test/next-build.test.ts
  • test/js/bun/spawn/spawn-streaming-stdout.test.ts
  • test/js/bun/util/which.test.ts
  • test/js/node/fs/fs.test.ts
  • test/js/node/stream/node-stream.test.js
  • test/js/third_party/webpack/webpack.test.ts
  • test/js/web/fetch/fetch.stream.test.ts
  • test/js/web/timers/setTimeout.test.js
  • test/js/web/worker.test.ts

View test output

#b6040e8956efe8a7867b0ef0ac418e18b745c4a8

@github-actions

github-actions Bot commented Nov 10, 2023 •

Copy link
Copy Markdown
Contributor

❌ @Jarred-Sumner 13 files with test failures on bun-darwin-x64:

  • test/cli/install/bun-run.test.ts
  • test/cli/install/registry/bun-install-registry.test.ts
  • test/integration/next/default-pages-dir/test/dev-server.test.ts
  • test/integration/next/default-pages-dir/test/next-build.test.ts
  • test/js/bun/ffi/ffi.test.js
  • test/js/bun/spawn/spawn-streaming-stdout.test.ts
  • test/js/bun/util/which.test.ts
  • test/js/node/fs/fs.test.ts
  • test/js/node/stream/node-stream.test.js
  • test/js/node/watch/fs.watchFile.test.ts
  • test/js/third_party/webpack/webpack.test.ts
  • test/js/web/fetch/fetch.stream.test.ts
  • test/js/web/timers/setTimeout.test.js

View test output

#b6040e8956efe8a7867b0ef0ac418e18b745c4a8

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