File Change Detection - poll interval

File Change Detection - poll interval

2
NewbieNewbie
2

    Apr 02, 2007#1

    Hi, I have a question about UltraEdit's forced interval file change detection. I have a local file which is modified frequently by several remote computers. Under the File Change Detection heading in the configuration menu, I have set automatic updating of changed files and a forced poll interval of one second. Then I turned on File Change Polling for the file in question. It works well, but my question is whether the one second interval is too low. I know the file is only reloaded in the editor if a change is detected, but how is that detection done? I'm assuming it is left up to the operating/file system to mark the file as changed, rather than UltraEdit constantly reloading the file to check. Does anyone know if the file is only read from disk if there was a change detected? I just want to make sure the file isn't read from disk over and over again every second.

    Thanks in advance.

    6,675585
    Grand MasterGrand Master
    6,675585

      Apr 02, 2007#2

      UE loads the file only when it is changed. The poll interval determines how often UE queries all the file informations (file name, file attributes, file size, file dates/times). Only when one bit in this information changes (normally the last modification date/time), the file is reloaded.
      Best regards from an UC/UE/UES for Windows user from Austria

      36
      Basic UserBasic User
      36

        Re: File Change Detection

        Apr 02, 2007#3

        I'd say you'd have to mail IDM and ask, because only they know how they've implemented that.

        I guess you could check the access time on the file and compare it to modify time ie. something like this:

        Code: Select all

        $ stat scrolltext.txt
          File: `scrolltext.txt'
          Size: 123             Blocks: 8          IO Block: 4096   regular file
        Access: 2007-03-19 17:08:54.000000000 +0100
        Modify: 2006-04-17 21:44:14.000000000 +0200
        Change: 2007-03-19 17:08:55.000000000 +0100
        $ cat scrolltext.txt
        $ stat scrolltext.txt
          File: `scrolltext.txt'
          Size: 123             Blocks: 8          IO Block: 4096   regular file
        Access: 2007-04-02 10:42:53.000000000 +0200
        Modify: 2006-04-17 21:44:14.000000000 +0200
        Change: 2007-03-19 17:08:55.000000000 +0100
        
        Notice the "Access:" info in both cases.

        That of course requires you to have something to check that with, dunno what's available under windoze except for properties which probably is too slow to play around with for your test. I'm sure there's some program to try with tho^^

        2
        NewbieNewbie
        2

          Apr 03, 2007#4

          All I wanted to know was whether it's safe to leave the poll interval at such a low value. Just wanted to make sure my hard disk isn't accessed thousands of times unnecessarily each day. Thanks for your replies, much appreciated. :D