Sael aftur !

Thanks for all your suggestions and ideas

After further investigation and tests it turns out that the costing event is the 
connection to expose_event of the DrawingArea, not the mouse_motion, nor the resizing 
of the window.
 self.area.connect("expose-event", self.area_expose_cb)
this redraws the content of the window.

The high CPU usage happens even when the whole window containing the drawingArea is 
minimized. Is this normal ?
What could I do to avoid such problem of updates?

Takk

Kve�ja

JB

On Tue, 02 Dec 2003 21:40:32 +0300
"Alejandro David Weil" <[EMAIL PROTECTED]> wrote:

> Hi!!
> 
> Well, that's what I was thinking on.
> 
> In imfish, i'm using a drawingArea.. 
> See the class FishPoolWidget method area_expose_cb.
> 
> I'm not using too many connections/signals, cause
> i don't support resize, but I handle some timeout
> callback to make re-draws. What I mean by callbacks?
> 
> I setup a function, called updateall, to be a timeout
> callback:
>       updateallhandler = gtk.timeout_add(80, updateall, win)
> 
> and then, the function:
> 
> def updateall ( someobject ):
>       someobject.update()
>       someobject.mainwidget.fastdraw()
>       return gtk.TRUE
> 
> well.. if you see the source in souceforge it'll be different,
> but here i have and old version..
> I'm asking about your callbacks 'cause if you don't use them,
> i don't know how some code can do tasks...
> 
> I'm a bit confused now, and with much tasks here at work..
>  ..i'll try to write later..
> 
> -----Original Message-----
> From: Jean-Baptiste Cazier <[EMAIL PROTECTED]>
> To: "Alejandro David Weil" <[EMAIL PROTECTED]>
> Date: Tue, 2 Dec 2003 13:38:50 +0000
> Subject: Re: [pygtk] High CPU consumption when idle !?
> 
> >S�ll !
> >
> >Thanks for he interest.
> >I am creating a gtkWindow and fill it with a GTkDrawingArea with many connections
> >I am not sure about what you mean about timeout/idle callbacks.
> >I use test on window resizing, and mouse motion but having the window minimized 
> >should force any CPU usage.
> >Moreover removing those connection did not drop the CPU usage,
> >
> >Concerning imfish, Iam not sure to find where you describe the similar problem and 
> >its solution
> >Can you please be more precise ?
> >
> >Thanks
> >
> >Jean-Baptiste
> >
> >On Tue, 02 Dec 2003 02:11:58 +0300
> >"Alejandro David Weil" <[EMAIL PROTECTED]> wrote:
> >
> >> Mmh.. I've had same kind of problems. I had them 
> >> partially fixed.. you could see the source at:
> >>   http://imfish.sourceforge.net/
> >> or provide more info to see what could be happening..
> >> How do you draw to window?
> >> Do you use timeout callback?
> >> Do you use idle callbacks?
> >> See ya!
> >> 
> >> -----Original Message-----
> >> From: Jean-Baptiste Cazier <[EMAIL PROTECTED]>
> >> To: [EMAIL PROTECTED]
> >> Date: Mon, 1 Dec 2003 17:22:18 +0000
> >> Subject: [pygtk] High CPU consumption when idle !?
> >> 
> >> >S�ll !
> >> >
> >> >I have developped a nice, but large program with a graphical interface with 
> >> >pygtk. 
> >> >However it is extremly CPU consuming (95%) even when idle or when the window is 
> >> >minimized
> >> >I have indeed a lot of "connect" set-up but could this be due to something else ?
> >> >
> >> >Could you please tell me if this is a normal behaviour or otherwise help finding 
> >> >where this comes from.
> >> >Is there any profiling tools around to see where the time is spent ?
> >> >
> >> >Takk
> >> >
> >> >Jean-Baptiste
> >> >PS: I am using on a powerful dual processor machine running RedHat9.0 with 
> >> >python-2.2.2-26 and pygtk2-1.99.14-4
> >> >
> >> >-- 
> >> >-----------------------------
> >> >[EMAIL PROTECTED]
> >> >
> >> >Department of Statistics
> >> >deCODE genetics     Sturlugata,8
> >> >570 2993          101 Reykjav�k
> >> >
> >> >_______________________________________________
> >> >pygtk mailing list   [EMAIL PROTECTED]
> >> >http://www.daa.com.au/mailman/listinfo/pygtk
> >> >Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
> >> >
> >
> >
> >-- 
> >-----------------------------
> >[EMAIL PROTECTED]
> >
> >Department of Statistics
> >deCODE genetics     Sturlugata,8
> >570 2993          101 Reykjav�k
> >
> >


-- 
-----------------------------
[EMAIL PROTECTED]

Department of Statistics
deCODE genetics     Sturlugata,8
570 2993          101 Reykjav�k

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to