Discussion:
When editing files on slow network filesystems, nedit ofen pauses (due to stat() calls) - how to disable?
h***@public.gmane.org
2010-03-20 21:48:38 UTC
Permalink
Hi,

I understand it is a feature of nedit that it looks for changes in the
edited file every other second (by calling stat() on the file).

However, this causes annoying pauses when editing a file on a slow
network filesystem.

I've tried to disable the check un-selecting the
preferences->DefaultSettings->Warnings options, but that does not help.

Using "strace nedit somefile.txt" I can see the stat() calls are still done.

Is there a way to disable that behaviour (short of changing the source
code)?

Thanks in advance,

Lutz
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Eddy De Greef
2010-03-20 22:49:19 UTC
Permalink
I'm afraid the only option is to modify the source code.
[CheckForChangesToFile() - source/file.c]
Even if you disable the warnings, NEdit still uses stat() to monitor the
file attributes (e.g. to update the title when the file is made
read-only externally).

Eddy
Post by h***@public.gmane.org
Hi,
I understand it is a feature of nedit that it looks for changes in the
edited file every other second (by calling stat() on the file).
However, this causes annoying pauses when editing a file on a slow
network filesystem.
I've tried to disable the check un-selecting the
preferences->DefaultSettings->Warnings options, but that does not help.
Using "strace nedit somefile.txt" I can see the stat() calls are still done.
Is there a way to disable that behaviour (short of changing the source
code)?
Thanks in advance,
Lutz
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
TK Soh
2010-03-21 02:47:38 UTC
Permalink
On Sat, Mar 20, 2010 at 10:49 PM, Eddy De Greef
Post by Eddy De Greef
I'm afraid the only option is to modify the source code.
[CheckForChangesToFile() - source/file.c]
Even if you disable the warnings, NEdit still uses stat() to monitor the
file attributes (e.g. to update the title when the file is made read-only
externally).
I have not looked into the code, but can't the checking be done in a
way that it doesn't 'tie up' nedit.
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
h***@public.gmane.org
2010-03-21 19:52:35 UTC
Permalink
Post by Eddy De Greef
I'm afraid the only option is to modify the source code.
[CheckForChangesToFile() - source/file.c]
Ok, thanks for pointing me to the function I'll have to change :-)
Post by Eddy De Greef
Even if you disable the warnings, NEdit still uses stat() to monitor the
file attributes (e.g. to update the title when the file is made
read-only externally).
Maybe the frequency of doing so could be made configurable in some
future release (if there is a future release ;-) - such a check
certainly wouldn't hurt even on a slow network file system when done
only every 5 minutes or alike.
Post by Eddy De Greef
I have not looked into the code, but can't the checking be done in a
way that it doesn't 'tie up' nedit.
I'm afraid that would require at least a separate process/thread and
non-blocking IPC, as there is no non-blocking alternative to the
stat-syscalls. Quite an effort in comparison to just allowing to
configure the interval.

Regards,

Lutz
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Loading...