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

Unnecessary file watch notification when I edit in marktext #1418

Closed
1 task done
Jocs opened this issue Oct 1, 2019 · 4 comments
Closed
1 task done

Unnecessary file watch notification when I edit in marktext #1418

Jocs opened this issue Oct 1, 2019 · 4 comments
Assignees
Labels
🐛 bug Something isn't working 🍏 platform/macOS Pull request or issue on macOS
Projects

Comments

@Jocs
Copy link
Member

Jocs commented Oct 1, 2019

Description

  • Can you reproduce the issue?

I edit the file in any folder, Unnecessary file watch notification shown after I save the edited file.

Steps to reproduce

  1. Open one folder with markdown file in Mark Text.
  2. Click one markdown file in side bar and edit the content.
  3. press Cmd + S to save file.

Expected behavior:

File be saved silently.

Actual behavior:

屏幕快照 2019-10-01 下午3 56 39

Link to an example: [optional]

Versions

  • Mark Text: develop
  • Operating system: macOS
@Jocs Jocs added the 🐛 bug Something isn't working label Oct 1, 2019
@Jocs Jocs added this to TO-DO in 0.16.0 Oct 1, 2019
@fxha fxha added the 🍏 platform/macOS Pull request or issue on macOS label Oct 1, 2019
@fxha
Copy link
Contributor

fxha commented Oct 1, 2019

@Jocs Maybe an issue with this function. Also network mapped folders cause this error, you need to use polling for network disks.

@Jocs Jocs self-assigned this Oct 2, 2019
@Jocs Jocs moved this from TO-DO to In Progress in 0.16.0 Oct 2, 2019
@Jocs
Copy link
Member Author

Jocs commented Oct 2, 2019

you need to use polling for network disks.

I don't quite understand what is saved to network disks? Do we use network disks?

Jocs pushed a commit that referenced this issue Oct 2, 2019
@Jocs Jocs moved this from In Progress to Review in 0.16.0 Oct 2, 2019
@fxha
Copy link
Contributor

fxha commented Oct 2, 2019

You need to set watcherUsePolling to true in preference.json if you want to watch files on a Network File System (NFS) such as iCloud Drive or Google Drive. Setting this to polling continuously checks all files for changes which can result in very bad performance and high CPU usage in larger directories. Could you please confirm that this is not a chokidar issue? Is it reproducible with v0.15.1?

chokidar documentation:

usePolling (default: false).
Whether to use fs.watchFile (backed by polling), or fs.watch. If polling
leads to high CPU utilization, consider setting this to false. It is
typically necessary to set this to true to successfully watch files over
a network
, and it may be necessary to successfully watch files in other
non-standard situations.

@Jocs
Copy link
Member Author

Jocs commented Oct 2, 2019

@fxha I use usePolling on macOS system, and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🍏 platform/macOS Pull request or issue on macOS
Projects
No open projects
0.16.0
  
Done
Development

No branches or pull requests

2 participants