[haiku-development] Bug #1247
- From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
- To: Haiku Development <haiku-development@xxxxxxxxxxxxx>
- Date: Tue, 29 May 2007 16:36:00 +0200
> [01:27] <mmlr> axeld: did you find time already to look into the
> tracker patch i attached to bug 1247?
> [01:29] <axeld> mmlr: no, but I was lucky when I read it :)
> [01:29] <axeld> mmlr: I'll try to look into it tomorrow
> [01:30] <mmlr> axeld: the whole feature was designed pretty bad
> [01:31] <mmlr> axeld: is it possible to watch things like free space
> with means of node monitoring?
> [01:31] <mmlr> axeld: then we could go with what francois suggests and
> remove the polling completely
> [01:33] <ithamar> hmmm would B_WATCH_STAT do the trick?
> [01:33] <ithamar> (on the volume's root dir)
Nope. That would only monitor the stat data of the root directory, not
volume stat info.
> [01:33] <mmlr> if it contains the volumes free space
> [01:37] <axeld> mmlr: you have to poll right now
> [01:37] <axeld> mmlr: which isn't too bad, either, I think
> [01:38] <mmlr> axeld: there are two things that could still lower cpu
> cycles
> [01:39] <mmlr> that is that the poseview knows (by means of the
> mimetype list) if it contains a volume pose at all
> [01:40] <mmlr> this could remove the one linear search through all
> poses for windows that do not contain a volume
> [01:41] <mmlr> on the other hand the (few) volume poses could register
> themselfs in a list which is then updated at pulse() instead of the
> detour through sendnotices()
> [01:42] <mmlr> while the first one would be easy, the second one has
> it's problems because you have to know which poseview the poses are
> contained in so that you can find their location and update them
> accordingly :-/
> [01:42] <axeld> Yes, but the latter solution still sounds best
> [01:43] <mmlr> i'll see if i can come up with something in the next
> days
> [01:43] <axeld> you could actually register the poseview as messenger
> with it
> [01:43] <mmlr> so you would only get notices if the view actually
> contains a volume?
> [01:45] <axeld> yes
Having the AutoMounter which already tracks mounted volumes, I suppose, it
would be a natural place for adding polling for volume stat data. Add a
listener/observer mechanism (I believe it already has one anyway) and let
the poses that use the info register.
CU, Ingo
Other related posts:
- » [haiku-development] Bug #1247