nodejs / nodejs/performance

Replace `watchFile` usage with native `watch`

Open
#26 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue help wanted
Dominant language
Shell
Stars
399
Forks
11
Avg merge
29m
Merged PRs (30d)
1

Description

internal/fs/recursive_watch.js uses watchFile which depends on polling with 5007ms intervals. Replacing watchFile functionality with FSWatcher from lib/internal/fs/watchers.js would improve the stability of the recursive watch functionality, and will provide better performance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in internal/fs/recursive_watch.js and read the FSWatcher implementation in lib/internal/fs/watchers.js, focusing on how the current watchFile polling is used. The work is done when recursive watching uses the native watcher path instead of 5007ms polling while retaining stability and improving performance.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
performance
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.