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

Follow file stops from time to time #464

Open
kindacute opened this issue Apr 16, 2022 · 8 comments
Open

Follow file stops from time to time #464

kindacute opened this issue Apr 16, 2022 · 8 comments
Milestone

Comments

@kindacute
Copy link

From time to time following of file stops and then starts by itself. So in 1 minute it can happen about 2-3 times when following file stops. I am using klogg almost in default configuration except highlightings (Attaching them to issue).

  1. Start reading file
  2. Wait 2-3 minutes

AR: Following is stopped from time to time
ER: Following doesn't stop and continue to read file

Klogg version is: 22.04.0.1216
QT version: 5.15.2
Macos Monterey 12.3.1

Highlights: listofhighlights.conf.zip
Generated crash file:72d2737d-51cc-4309-a9f4-68293b6f71e9.dmp.zip

@wangjianpeng
Copy link

I have similar problem that couldn't monitor file at real time .You could try to enable polling for changes in options. It works ok now.

@variar
Copy link
Owner

variar commented Apr 17, 2022

@kindacute looks like enabling polling for changes in klogg options could help in this case. Klogg uses efsw library for file changes monitoring. It could be that notifications are delayed until changes go from fs cache do disk. I don't have any mac hardware, so it is hard to test properly.

@kindacute
Copy link
Author

@wangjianpeng , @variar thank you guys, I will try polling tomorrow and will let you know if it helps

@kindacute
Copy link
Author

Works good with polling.

@variar
Copy link
Owner

variar commented Apr 19, 2022

Good to know. Efsw has two file monitoring backends for macOS. I'll check which one is better, or maybe add an option to choose a backend.

@variar variar added this to the 2022.next milestone Apr 19, 2022
@kindacute
Copy link
Author

kindacute commented Apr 20, 2022

Looks like polling is not good too, what is minimal value for it? I tried 200 ms and 100 ms, but klogg updates file with much greater random interval. Especially it is noticeable when lot of data writes into file

@variar
Copy link
Owner

variar commented Apr 20, 2022

That could also be related to some file system level caching. I usually leave polling interval at 2000ms. Making it lower than 500ms will just cause unnecessary load. I'm still looking for reliable cross-platform library for file changes notifications. But with more reports like this it looks like I'll have to dig into platform-specific libraries or tail source code.

@variar
Copy link
Owner

variar commented May 20, 2022

Klogg has some throttling for file system notifications as sometimes in big file trees there are so many events that it hangs (see #286). Throttling interval was set to 500ms. Reducing it to 250ms should make klogg more responsive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants