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

Design Meeting Notes, 8/30/2024 #59809

Open
DanielRosenwasser opened this issue Aug 30, 2024 · 0 comments
Open

Design Meeting Notes, 8/30/2024 #59809

DanielRosenwasser opened this issue Aug 30, 2024 · 0 comments
Labels
Design Notes Notes from our design meetings

Comments

@DanielRosenwasser
Copy link
Member

Adding Compile-Caching Entry Points

#59720

  • Node.js now supports V8 compilation caching.
    • Recent PR to Node.js to add module.enableCompilerCache().
    • Previously were ways to do this with 3rd party packages on npm.
  • Node.js doesn't do this by default, but things like ts-node does on supported versions of Node.js.
  • What's the downside?
    • You need to have require to make this work, awkward for ESM.
    • This is being worked on.
  • tsc and tsserver start up about 2.3x faster.
  • For executables this is a no-brainer. We can actually use import() there too.
  • For libraries, questionable. So the PR doesn't do it.
  • The PR must introduce a new entry point for the library. Is this worth the perf improvement?
    • Yes.
    • Just add a comment telling people what's going on and it's fine.
  • Another risk - in development we recompile over and over, and that can pollute the cache.
    • The files are pretty small - not a huge risk.
    • We can add hereby clear-node-cache.
  • Not going to be immediate - Node-specific work would need to be back-ported in in Node.js 22; otherwise only noticeable in Node 23+.
@DanielRosenwasser DanielRosenwasser added the Design Notes Notes from our design meetings label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Notes Notes from our design meetings
Projects
None yet
Development

No branches or pull requests

1 participant