Coder Social home page Coder Social logo

Comments (3)

asg017 avatar asg017 commented on May 26, 2024

Thanks for the detailed report!

I'll look into this. At worst, I'll add a new option like --update-delay 100 or something if there isn't a straightforward fix, but Dataflow uses chokidar under the hood for this, so I would be surprised if there wasnt a better solution

from dataflow.

pingemi avatar pingemi commented on May 26, 2024

Absolutely! And dataflow seems really nice (still exploring it!)

Good call on Chokidar; looks like it has an "awaitWriteFinish" option (default: off) that solves the problem by internally debouncing. Unfortunately the default debounce time is 2 seconds! Can override the default to 50ms like this:

{'awaitWriteFinish': {'stabilityThreshold':50}}

Figured I'd see what VS Code does. Interestingly while VS Code uses Chokidar for file watching on Unix/MacOS targets, it uses a C# helper app instead for Win32. This app has a 50mS debounce time:

https://github.com/microsoft/vscode-filewatcher-windows/blob/main/FileWatcher/EventProcessor.cs#L15

from dataflow.

tstodter avatar tstodter commented on May 26, 2024

Just general FYI I've been having the same issue on VS Code (it's bad enough to make Dataflow unusable) but did verify that changing

chokidar.watch(notebookPath).on("all", (event, notebookPath) => {
to

chokidar.watch(notebookPath, {awaitWriteFinish: {stabilityThreshold: 50, pollInterval: 50}})

solves the issue perfectly every time.

I can look into making a PR for this if it would be helpful.

from dataflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.