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

Re: [E-devel] Too many Ecore events stop the Ecore's main loop?



On Sun, Jul 02, 2006 at 06:40:50PM +0200, Simon TRENY wrote:
> Hi everyone,
> 
> In Etk, in order to update the widgets when the window is resized, I
> use an ecore job: in the Ecore_Evas's resize_cb, I just create an
> "update job" with ecore_job_add() if there is no "update job" created
> yet. This job will resize the widgets.
> 
> My problem is that if the window is resized too often (i.e. if I drag
> the bottom-right corner of the window, and draw small circles with the
> mouse to resize the window), the "update job" is not called anymore.
> When I stop resizing, the job is called again.
> 
> I wrote a small code (attached to this mail) to illustrate the problem.
> Just try to resize the window of the test prog (by "drawing small
> circles" witht the mouse), and you'll see that sooner or later, the job
> won't be called anymore (no more output in the terminal and the purple
> rectangle is no longer resized). Jobs are not the only ones affected by
> this problem, I tried with timers and animators, they are also not
> called. Ecore's main loop just seems to be stopped when the window is
> resized?!
> 
> For info, my CPU is an Athlon XP 2700+
> 

I'm not sure what the priority levels for various handlers are, but iirc
jobs are run on idle (or at least have a fairly low priority). If the event queue gets swamped, or cpu is taken
up by other things they might not get called until later. Timers have a
similar issue, and i believe animators are just a convenience wrapper
around timers. For example, the 'sliding door' effect in the Winter
pager gets really choppy (or gets skipped altogether) when switching to
or from a desktop with cpu intensive / slow drawing windows (e.g.
Firefox).

I'm not sure if it other processes getting priority or other events in
the ecore queue.

rephorm