[PATCH] window: Don't needlessly sync parent and geometry
majerech.o at gmail.com
Sun Sep 14 08:09:38 PDT 2014
On Sun, 14 Sep 2014 13:52:21 +0100
Daniel Stone <daniel at fooishbar.org> wrote:
> On 13 September 2014 15:35, Ondřej Majerech <majerech.o at gmail.com>
> > When a toytoolkit client redraws, the toolkit syncs the parent and
> > geometry. If a client redraws often (such as the terminal drawing a
> > huge amount of output), this can spam the compositor with requests
> > and may result in the client's eventual being killed.
> > We don't need to send requests for changing the geometry or parent
> > if these haven't changed. So remember the last geometry and parent,
> > and update them only if needed.
> It looked from weston-terminal output like these happened completely
> unbounded by the frame callback; should these instead be moved
> somewhere where the requests are only issued once per frame,
> regardless of how many times they change in between?
Yes, throttling seems to be the way to go, judging from the dicussion
Only problem is that, so far as I can tell, idle_redraw (which is where
these two requests are indirectly sent from in this scenario) is a
place that is supposed to only be called at most once per frame.
terminal.c seems to call window_schedule_redraw whenever it receives
and processes a chunk of data from the tty. So maybe we should make
window_schedule_redraw actually schedule a redraw for when the current
frame has been finished?
More information about the wayland-devel