Marak / Marak/data-behaviors

Ted.js - better file watching

Open
#4 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
9
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Ted's current directory watcher is not ideal. We are using nodes sync filewatcher api on several nested files and directories in a loop. We are also unwatching these same items with the sync filewatcher.

There is a bit of an OS race condition here with MacOS's filesystem and the file watcher which is currently being solved with a forced delay. I think if we switch to the macs native FSEvents (http://en.wikipedia.org/wiki/FSEvents) we'll get much better performance and response time from Ted.

Contributor guide

No contributing guide indexed for this repository

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 by locating Ted's directory-watcher loop and its synchronous watch and unwatch calls, then inspect the forced delay used for the macOS race condition. Research how FSEvents could replace the current approach. Done means the watcher has better performance and response time without relying on the forced delay.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, macos, node.js
Domain
performance, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.