Skip to content

Use a less greedy file watcher for lower dev CPU usage #2293

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

Closed
wants to merge 1 commit into from

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Sep 5, 2021

This proposes using a less greedy file watcher for our default yarn start setup

It also removes the max header size because we now use session sharing rather than huge url sizes

The less greedy file watcher helps reduce CPU usage considerably from ~6% CPU (what i see pretty much constantly while yarn start is idling, similar to the ~7% reported in the issue) to nothing (in issue it is reported as ~0.2%)

microsoft/TypeScript#31048

e.g. this is pretty much what my computer looks like 100% of the time developing jbrowse
Screenshot from 2021-09-05 14-06-37

The reason why this PR is in question is that Typescript decided not to make it their default at the time being due to some rare caveats but IMO it is rare enough that we could make it default

Laptop temp cooler===happy

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Sep 5, 2021
@cmdcolin cmdcolin added internal and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Sep 5, 2021
@rbuels
Copy link
Contributor

rbuels commented Sep 5, 2021 via email

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Sep 6, 2021

devs who want this can add

TSC_WATCHFILE=UseFsEventsWithFallbackDynamicPolling

to their bashrc or similar

might just close for now

@cmdcolin cmdcolin closed this Sep 6, 2021
@cmdcolin cmdcolin deleted the alt_watcher branch September 7, 2021 14:07
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