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

Put filewatcher in a worker, for better stability and performance #1368

Merged
merged 11 commits into from
May 21, 2018

Conversation

DeMoorJasper
Copy link
Member

@DeMoorJasper DeMoorJasper commented May 14, 2018

This PR puts FSWatcher into a worker, this helps to add extra stability.

Fixes:

  • Segfault error inside fsevents
  • Freezing on windows
  • Significant performance boost in watch mode

Some tests I've done on performance:

Description With current master with fswatcher-child
Very small app without cache (On Mac OS X High Sierra) 8.8secs 4secs
Small app with a lot of requires and import without cache (On windows 10) 22secs 7secs

fswatcher-child: https://github.com/DeMoorJasper/fswatcher-child

Closes #1342 Closes #1331 Closes #1394 Closes #1357 Closes #1308

@DeMoorJasper
Copy link
Member Author

Tests pass now, only the Cargo one fails which is unrelated to this PR

@devongovett
Copy link
Member

hmm interesting idea. what do you think about using our existing worker infra in parcel for this?

@DeMoorJasper
Copy link
Member Author

@devongovett Thought it would be a better idea to make it lightweight.
The main goal was to sandbox chokidar from parcel to prevent errors and crashes. It doesn’t need multiple workers and localworker in this case wouldn’t prevent the crashes

Sent with GitHawk

@DeMoorJasper DeMoorJasper changed the title Put filewatcher in a worker, for better stability Put filewatcher in a worker, for better stability and insane performance boost May 18, 2018
@DeMoorJasper
Copy link
Member Author

@devongovett I've added some benchmarks, as I've just discovered after running the inspector on a project that it also boosts dev builds on non windows machines quite a lot

@DeMoorJasper DeMoorJasper changed the title Put filewatcher in a worker, for better stability and insane performance boost Put filewatcher in a worker, for better stability and performance May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants