KIdleTime library
Ian Wadham
ianw2 at optusnet.com.au
Sun Jul 12 00:37:46 BST 2009
On Sun, 12 Jul 2009 2:38:18 am Dario Freddi wrote:
> On Saturday 11 July 2009 17:39:31 Sebastian TrĂ¼g wrote:
> > > Not quite so. The user is not all of 'else' that may be happening. If
> > > Strigi starts indexing after 20 seconds of user inactivity, then it may
> > > kick in e.g. after I start compilation and sit back to watch the
> > > output, thus actually starting at rather bad moments (since otherwise
> > > it might index while I'm typing the code, which causes much lighter
> > > CPU/IO load).
> > >
> > > If you really want to index mainly when nothing else is happening, you
> > > need to watch the system load. The user inactivity timeout may still be
> > > a nice addition, but I would suggest a noticeably higher timeout that
> > > would mostly mean that the user really is not doing anything at the
> > > moment.
> >
> > I agree. Any chance to add support for that to KIdleTime? Maybe making it
> > more generic?
>
> Why not. It is definitely possible to, but I need someone to point me in
> the right direction, as I don't know if there's a mechanism to find out the
> idle time of the system
>
It is great to see you showing concern about these issues at this stage,
Sebastian and Dario.
Just a few months ago I was compiling qt-copy, which itself takes a fair
hunk of disk space. The whole process came to a grinding halt. I was
"idle" but the computer was going flat chat. The thing called "Beagle"
decided to cut in, to do some indexing, and proceeded to fill up a disk
partition ... I could not quickly find a way of stopping it, so I was
extremely "busy" for the next few minutes deleting stuff and releasing
space faster than the Qt compile could use it. I have since switched
that little dog thing off.
Unix/Linux have several commands for monitoring system resources,
such as "top". These must have underlying library functions, but I
cannot find them ATM. Nor can I find anything cross-platform in Qt.
KDE has a utility called ksysguard that displays system-load info,
maybe you could get some ideas from the code there.
I hope too, that any indexing or other tasks KDE may do, while the user
is "idle", will be "nice"d at least (i.e. run at low CPU priority). Users do
lots of things that leave the keyboard and mouse idle for long periods ---
such as compile KDE, download, listen to music, watch movies or run
the XaOs fractal zoomer in autopilot mode (which takes all of any CPU
you can throw at it).
Background O/S activity can reduce enjoyment --- not to mention another
well-known windowing system which, if not carefully controlled, will reach
out over the Internet and update itself just when you have an assignment
to finish and hand in and you are running late for classes (the defaults
and system messages will nag the average user into allowing the system
to take over "automatically" in this way whenever he/she boots up) ... :-(
Cheers, Ian W.
More information about the kde-core-devel
mailing list