OK, I got developer access now. That was fast.

I've created a merge request
https://gitlab.com/inkscape/inkscape/merge_requests/169

On Sun, Dec 31, 2017 at 4:08 AM, Yale Zhang <yzhang1985@...400...> wrote:
Hi, I've identified why drawing is lagging with GTK+3.
https://bugs.launchpad.net/inkscape/+bug/1723247

It's because of GTK3's motion event compression:
https://bugzilla.gnome.org/show_bug.cgi?id=702392

Adding a  gdk_window_set_event_compression (window, FALSE);  in SPCanvas::handle_realize() makes things much smoother.

At 1st I thought it was because the events were sitting in the queue for too long. So I added some timing code to measure the latency between when a motion event was generated in GDK  to when SPCanvas::paint() is called. Actually, I detect bursts of mouse moves or redraws and only use the 1st for latency measurements since there might not be a 1 to 1 relation between motion events and redraws. I was seeing a 4 to 10ms latency for head (GTK3) but only 0.5 ms for 0.92 (GTK2).

I thought I was on to something, but this mislead me for a while. Finally, I saw that the # motion events and redraws were 10x higher for GTK2.


I haven't stayed up to date with the GitLab migration. I tried to push a patch to my branch simdgenius_inkscape, migrated from Bazaar, but access is denied. I just requested project access, so appreciate it if someone grants it.

-Yale