Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#304 5.4RC1 Constant file access is debilitating

release
closed-works-for-me
nobody
Program (402)
5
2004-06-28
2003-08-13
Michael Sullivan
No

I don't know the reason why, but under certain
circumstances, NEdit starts re-reading open files
continuously.

I discovered this when I had a packet sniffer open and I
just happened to select some text in an open NEdit
window (file A). Hundreds of packets started flying by.
It turns out that in a completely separate NEdit window
that was minimized at the time (file B), I had a file open
from a network drive. NEdit was accessing file B like
crazy. As I held the mouse button down in file A's
window to select different sections of text, file B was
being continuously accessed.

When file B is on a Windows share, approximately 75
SMB packets were generated a second. When file B is
on an NFS volume, approximately 9 NFS packets were
generated a second. In both cases, the entire contents
of the file was being read over and over.

I don't know the purpose of all this extra file access, but
I'm certain that I don't want it happening. If it has to
do with NEdit checking in the file system to make sure
that nothing is changed, it needs to be tied to
NEdit's "Files Modefied Externally" preference (which I
have turned off, BTW).

Discussion

1 2 > >> (Page 1 of 2)
  • Eddy De Greef
    Eddy De Greef
    2003-08-13

    • labels: --> Program
     
  • Eddy De Greef
    Eddy De Greef
    2003-08-13

     
    Attachments
  • Eddy De Greef
    Eddy De Greef
    2003-08-13

    Logged In: YES
    user_id=73597

    I verified the source code, and as far as I can tell, NEdit
    will never re-read a file's content when the "Files Modified
    Externally" setting is turned off.
    Maybe Cygwin is pulling tricks on you (I assume you're still
    using Cygwin).
    Anyway, I have attached a small patch that logs all relevant
    fopen() and fread() calls to stderr. If you apply it and run
    your test again, you should get an idea of how many times
    NEdit reads a file. If nothing shows up while your packet
    sniffer picks up the traffic, then NEdit is not involved.

    Do you also get this kind of traffic with 5.3 ?

     
  • Scott Tringali
    Scott Tringali
    2003-08-13

    Logged In: YES
    user_id=11321

    Or use "strace -ofile.txt nedit" to log system calls to a
    file.

    It sounds like the file differ is going haywire and running
    "all the time", regardless of the pref setting.

    I tried this on a 5.3 Windows binary and nedit sits
    perfectly idle when, uh, idle.

     
  • Scott Tringali
    Scott Tringali
    2003-08-13

    Logged In: YES
    user_id=11321

    Here's another possibility - maybe the clocks between your
    machines are skewed, so that we when check timestamps it's
    "always modified", even though it's really up to date?

    Naturally, nothing should be checking file if the pref is
    off, but I wonder if this may be an issue.

     
  • Logged In: YES
    user_id=836812

    I applied the patch you gave me, but unfortunately, I haven't been
    able to reproduce the problem since I quit and restarted NEdit. I'll
    keep watching for it.

     
  • Scott Tringali
    Scott Tringali
    2003-10-14

    Logged In: YES
    user_id=11321

    Frank Perbet has rewoked this area significantly and posted a patch
    you may be interested in. I'd like to integrate this for 5.5+.

     
  • Scott Tringali
    Scott Tringali
    2003-10-14

     
    Attachments
  • Scott Tringali
    Scott Tringali
    2003-10-14

    • milestone: --> release
    • status: open --> open-works-for-me
     
  • Eddy De Greef
    Eddy De Greef
    2004-06-21

    Logged In: YES
    user_id=73597

    Is this still an issue with recent Cygwin/Lesstif versions?

     
1 2 > >> (Page 1 of 2)