Hi Yale,
great to see somebody looking into this!
I was looking into motion event compression before and it certainly sounds like something that could improve responsiveness of certain tools in Inkscape.
Unfortunately it does not noticeably improve redraw performance in relation to the cited bug for me - as mentioned in the bug report it becomes extremely noticeable with increasing window size and happens for "simple" tasks like moving a rect on canvas. For a 2560x1440 window redrawing basically stops for me while moving the mouse and only resumes once I stop movement of the mouse pointer...
I hope we can figure out the source - you certainly seem to be more experienced with profiling tasks (maybe you can give me some pointers on your workflow?) eventually...
Best Regards, Eduard
Am 31.12.2017 um 10:52 schrieb Yale Zhang:
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... mailto:yzhang1985@...400...> wrote:
Hi, I've identified why drawing is lagging with GTK+3. https://bugs.launchpad.net/inkscape/+bug/1723247 <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 <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
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel