Re: Weston screenshooter blocks the display for over a second

2019-10-30 Thread The Rasterman
On Mon, 28 Oct 2019 18:43:02 +0100 CHUCO POGA  said:

> When attempting to make a screenshot under weston with Mod + S
> (weston-screenshooter), the entire display get's blocked for over a second.
> That causes an ugly jitter on the screen when displaying dynamic content
> (such as movies)
> 
> I have looked into the screenshooter client code and did some performance
> measurements, and it appears that the while(!buffer_copy_done) loop which
> calls wl_display_roundtrip takes a second to finish. Is there any way to
> make the screenshot async, to not interfere the currently displayed
> content? Or is it the way the protocol works under the hood?

If the screen is freezing entirely then it's not the client that is at fault
but the compositor, so you want to be debugging the compositor code (weston)
not the client. The client may help illustrate which requests are being sent at
that time, but it's the compositor at fault here.

-- 
- Codito, ergo sum - "I code, therefore I am" --
Carsten Haitzler - ras...@rasterman.com

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Re: Weston screenshooter blocks the display for over a second

2019-10-29 Thread Pekka Paalanen
On Mon, 28 Oct 2019 18:43:02 +0100
CHUCO POGA  wrote:

> When attempting to make a screenshot under weston with Mod + S
> (weston-screenshooter), the entire display get's blocked for over a second.
> That causes an ugly jitter on the screen when displaying dynamic content
> (such as movies)
> 
> I have looked into the screenshooter client code and did some performance
> measurements, and it appears that the while(!buffer_copy_done) loop which
> calls wl_display_roundtrip takes a second to finish. Is there any way to
> make the screenshot async, to not interfere the currently displayed
> content? Or is it the way the protocol works under the hood?

Hi,

the while-loop you mention is in the screenshooter client, and I see it
is a busy-roundtrip which is not nice. Does putting a small delay in
that loop make things better? E.g. nanosleep().

If not, you will have to debug or profile the compositor instead to see
where the time is spent.

If yes, the client should be fixed to dispatch only instead of
roundtrip.


Thanks,
pq


pgpQLfJgtACJb.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Weston screenshooter blocks the display for over a second

2019-10-29 Thread CHUCO POGA
When attempting to make a screenshot under weston with Mod + S
(weston-screenshooter), the entire display get's blocked for over a second.
That causes an ugly jitter on the screen when displaying dynamic content
(such as movies)

I have looked into the screenshooter client code and did some performance
measurements, and it appears that the while(!buffer_copy_done) loop which
calls wl_display_roundtrip takes a second to finish. Is there any way to
make the screenshot async, to not interfere the currently displayed
content? Or is it the way the protocol works under the hood?
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel