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

HMR watcher should not call module resolver on watcher thread #17337

Open
Jarred-Sumner opened this issue Feb 14, 2025 · 0 comments
Open

HMR watcher should not call module resolver on watcher thread #17337

Jarred-Sumner opened this issue Feb 14, 2025 · 0 comments
Assignees
Labels
bake:dev hot-reloading dev server for client+server applications

Comments

@Jarred-Sumner
Copy link
Collaborator

onFileUpdate is not being thread safe. It needs to enqueue a task to the main thread. It should coalesce these. Maybe we can get away with sending hashes instead of the file path bytes. It will need to allocate probably regardless.

Remember that module resolution opens lots of file descriptors and parses stuff. Benchmarking making it multi threaded some time ago made the bundler slower due to increasing the file descriptor table size.

@Jarred-Sumner Jarred-Sumner added the bake:dev hot-reloading dev server for client+server applications label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bake:dev hot-reloading dev server for client+server applications
Projects
None yet
Development

No branches or pull requests

2 participants