Rusty Ballinger wrote:
>
> No, it's OK; on Linux, when fam starts up, it creates /dev/imon with the
Thanks. I've checked /proc/devices and /proc/fs/imon-* and it is all
working fine.
> We're talking about NEdit, right? (I love nedit!) I don't know. NEdit
Yes, that was exactly what I what I was talking about.
> stats the file you're editing when the window gets focus, right? That seems
It isn't just when NEdit gets focus that it checks for modifications to
the file: as far as I can tell, the checking is done at various points.
There is a procedure which does the actual check
(CheckForChangesToFile) which first compares a timestamp so that the
check is not done more often than once every 3 seconds
(MOD_CHECK_INTERVAL). This procedure is called from three places which
as far as I can tell are when the window gets focus, the cursor is
moved or when the edit buffer is modified by, for example the user
typing.
This means that the polling will be done for every user keypress which
is fairly regularly. It also seems that it doesn't just do a stat, it
checks whether the file can be written to so I'm not sure how that
could be done with fam. Also, do you know if motif offers a way that
the select approach could be used with fam?
> Once you're running, I think there's basically no overhead (just one
> more fd in the select), but when you connect to fam, FAMOpen() has to get a
> port number from the portmapper, and open a couple of sockets, so there's a
> bit of overhead there. If fam isn't already running, then someone has to pay
> for inetd forking & starting it up, but only the first client has to do that.
I'd have thought that given time, there will be a good few programs
using fam, especially with it being used in KDE's standard library so
that the initial inetd start would become less relevant. Do many of the
IRIX programs use fam?
Anyway, if you think it would be useful addition to NEdit, I'll have a
go at adding it.
Oliver Kiddle
--
Source code, list archive, and docs: http://oss.sgi.com/projects/fam/
To unsubscribe: echo unsubscribe fam | mail majordomo@xxxxxxxxxxx
|