Trolltech Home | Qtopia-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qtopia-interest Archive, March 2007
[MOQP] polling for files


Message 1 in thread

Hello,

I wonder why you still poll for files. In QtopiaCore4.2 you have this  
rather nice class called QFileSystemWatcher, why don't you use this  
Core functionality?

The files in question are
	Settings/Trolltech/qpe.conf
	Settings/Trolltech.conf
	etc/default/Trolltech/qpe.conf
	etc/default/Trolltech.conf
	/var/run/stab
	/var/state/pcmcia/stab
	/var/lib/pcmcia/stab
	/proc/mounts (well this doesn't work with inotify but use udev?)
	$HOME

As outlined by Robert Love in his project Utopia, polling is evil,  
specially on battery powered devices. Is there any reason you do not  
use modern technology on a modern linux kernel?

kind regards
	h.

PS: It is nice to see quicklauncher and qss don't have any timer  
running and sleep nicely in select
PPS: Let us save battery power



--
 [ signature omitted ] 

Message 2 in thread

Holger Freyther wrote:
> Hello,
>
> I wonder why you still poll for files. In QtopiaCore4.2 you have this
> rather nice class called QFileSystemWatcher, why don't you use this
> Core functionality?
>
> The files in question are
>     Settings/Trolltech/qpe.conf
>     Settings/Trolltech.conf
>     etc/default/Trolltech/qpe.conf
>     etc/default/Trolltech.conf
>     /var/run/stab
>     /var/state/pcmcia/stab
>     /var/lib/pcmcia/stab
>     /proc/mounts (well this doesn't work with inotify but use udev?)
>     $HOME
>
> As outlined by Robert Love in his project Utopia, polling is evil,
> specially on battery powered devices. Is there any reason you do not
> use modern technology on a modern linux kernel?
>
> kind regards
>     h.
>
> PS: It is nice to see quicklauncher and qss don't have any timer
> running and sleep nicely in select
> PPS: Let us save battery power
>
>
>
> -- 
> To unsubscribe - send "unsubscribe" in the subject to
> qtopia-interest-request@xxxxxxxxxxxxx
>
>
Because this technology doesn't work unless you have a modern kernel ;)
we don't have inotify or dnotify on 2.4 kernels, and that's exactly
what's in the greenphone. There's ongoing work to make the polling more
phone friendly, but, there's not much else we can do unless there's a
way to get (working) notifications from the kernel on file change
(especially proc/mounts).

-- 
 [ signature omitted ] 

Message 3 in thread

Am 05.03.2007 um 22:49 schrieb Bill KING:

> Because this technology doesn't work unless you have a modern  
> kernel ;)
> we don't have inotify or dnotify on 2.4 kernels, and that's exactly
> what's in the greenphone. There's ongoing work to make the polling  
> more
> phone friendly, but, there's not much else we can do unless there's a
> way to get (working) notifications from the kernel on file change
> (especially proc/mounts).

Shouldn't the technology used (polling vs. inotify) be a secret of  
the QFileSystemWatcher? So by using this class on ancient and  
unmaintained kernels it could poll, on modern devices it could use  
inotify automatically? And not to my suprise this is what  
QFileSystemWatcher is doing. So there is no excuse in not using  
QFileSystemWatcher :)

h.






Message 4 in thread

Holger Freyther wrote:
>
> Am 05.03.2007 um 22:49 schrieb Bill KING:
>
>> Because this technology doesn't work unless you have a modern kernel ;)
>> we don't have inotify or dnotify on 2.4 kernels, and that's exactly
>> what's in the greenphone. There's ongoing work to make the polling more
>> phone friendly, but, there's not much else we can do unless there's a
>> way to get (working) notifications from the kernel on file change
>> (especially proc/mounts).
>
> Shouldn't the technology used (polling vs. inotify) be a secret of
> the QFileSystemWatcher? So by using this class on ancient and
> unmaintained kernels it could poll, on modern devices it could use
> inotify automatically? And not to my suprise this is what
> QFileSystemWatcher is doing. So there is no excuse in not using
> QFileSystemWatcher :)
>
> h.
>
>
>
>
>
I kind of agree, but QFileSystemWatcher's very heavy for 2.4 kernels,
and by that's a huge chunk of the embedded world too. I'm not the one
working on this particular piece, but if I know the dev, he'll come up
with a solution that's rather swanky, and works rather well given the
rather poor choices for anything less than 2.6.13

-- 
 [ signature omitted ]