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

Use only chokidar for watching and add more logging in copy-res.ts #26591

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

Johennes
Copy link
Contributor

@Johennes Johennes commented Nov 15, 2023

For: #26593

We're currently using both cpx and chokidar for watching files in copy-res.ts. This is suboptimal because:

  1. cpx is slow when watching files in large directories
  2. We have to maintain two different ways of watching in the script which increases complexity

This pull request switches all watching in the script to use chokidar. This reduces the initial runtime of yarn run ts-node scripts/copy-res.ts -v -w from 4.5s to 2.4s on my machine1. Additionally logging for the watcher setup is added in verbose mode.


This change is marked as an internal change (Task), so will not be included in the changelog.

Footnotes

  1. It's worth pointing out that most of the speed-up could also have been had by setting directwatch: 1 on contribute.json.

@Johennes Johennes added the T-Task Tasks for the team like planning label Nov 15, 2023
@Johennes Johennes requested a review from a team as a code owner November 15, 2023 19:29
@Johennes Johennes requested review from richvdh and t3chguy November 15, 2023 19:29
@Johennes Johennes changed the title Use only chokidar for watching and add more logging Use only chokidar for watching and add more logging in copy-res.ts Nov 15, 2023
@Johennes Johennes merged commit 897bca6 into develop Nov 16, 2023
22 checks passed
@Johennes Johennes deleted the johannes/one-watcher-to-rule-them-all branch November 16, 2023 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants