[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] [Evas] Mouse move events and perfs



On Wed, 12 Apr 2006 20:42:11 +0200 Simon TRENY <simon.treny@free.fr> babbled:

> Hi there,
> 
> Sorry to annoy you again with my performance issues, but I noticed
> something really weird, and I'd like to have some advices about it.
> So the problem still concerns performances with scrolling a tree or an
> iconbox in Etk.
> 
> 
> I noticed that when I drag the scrollbar with the mouse, the redraw may
> be laggy if the viewport is large. And worse, if the viewport is large
> enough, Evas redraws the viewport only when I stop moving the mouse
> (i.e. instead of redrawing it at low fps, it doesn't redraw it at all,
> it just wait for the mouse to stop).
> 
> On the other hand, when I use a timer to scroll the viewport (by
> clicking on one of the arrows of the vertical scrollbar for example),
> it's not laggy anymore (or much less), scrolling just seems a lot
> smoother. The delay of the timer is 1/30 sec.
> Now if I start to move the mouse while I'm still pressing the arrow of
> the scrollbar, the display become laggier. Really weird since the "mouse
> move" event on the arrow is not connected to any callback (except maybe
> by edje, the scrollbar being an edje object).
> 
> The problem is hard to explain, and hard for you to reproduce since I
> guess most of you probably have some pretty powerful computers.
> I sort of fixed the problem of "evas not redrawing the viewport while
> the mouse is moving" by using an ecore job in the callback connected to
> the "drag" signal of edje on the scrollbar: in this callback, if the
> job is not created, I just create it; otherwise I do nothing. And in the
> job, I emit my own "dragged" signal. That's way, the "dragged" signal
> is not emitted each time the mouse is moved, but one time, when the job
> is executed. The viewport is then refreshed more often, but it's still
> laggy.

it actually sounds like evas is processing excessive events somehow. this could
be

1. because no object has been told to pass events through (as if it didn't
exist)
2. excessive clipping
3. could be excess edje signals (same as 1.)
4. maybe too many object repeat events too

maybe you have an event/callback loop that basically means evas is handling the
mouse event, the drag, then responding, then repeating this process without
ever getting to an idle state.

> What I do not understand is why when I use a timer to scroll, it seems
> smooth and when I use the mouse to drag the scrollbar, it's laggy?!
> 
> Have you any idea about that? Maybe the "mouse move" events shouldn't be
> emitted so often, and evas should maybe only emit the event
> corresponding to the "result" of the mouse movement (i.e. the sum of
> all the smaller "mouse move" events). The result could be emitted in
> some kind of job (well, evas doesn't have job though) as I have done
> with the scrollbar.

it already compresses mouse events. this is i think a self-feeding event loop
as above. or simple never getting a chance to go idle

> 
> Hoping I was clear enough...
> Regards,
> Simon TRENY <MoOm>
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)