Community
Participate
Working Groups
Please launch the attached snippet. 1 or 2 Paint events occur. If you move the mouse over the window, it will show some MouseMove events followed by Paint events. But a) a lot of Paint events occur between having moved the mouse and the MouseHover event occurs, and b) up to 3s after the MouseHover event occurred, a lot of Paint events are received. 4:29:52 PM: p 4:29:53 PM: mpmpmpmpmpmpmppp 4:29:53 PM: ppppppppppppppp 4:29:53 PM: ppppppphpppppppp 4:29:54 PM: ppppppppppppppp 4:29:54 PM: ppppppp 4:29:55 PM: ppppppppp 4:29:55 PM: ppppppppppppppp 4:29:55 PM: ppppppppppppppp 4:29:56 PM: ppppppppppppppp 4:29:56 PM: pppppp
Created attachment 278188 [details] Sample code to reproduce
On macOS and Windows we do not receive any Paint event when moving the mouse. macOS: 4:48:16 PM: ppp 4:48:18 PM: mmmmmmmmmmmmm 4:48:18 PM: mmmmmmmmmmmmmmmmmmmm 4:48:18 PM: mmmmmmmmmmmmmmmmmmmmmmmmmmmm 4:48:19 PM: m 4:48:19 PM: h 4:48:21 PM: mmmmmmmmm 4:48:21 PM: mmmmmmmmmmmmmmmmmmmmmmmmmmm 4:48:21 PM: mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm 4:48:21 PM: mmmmmmmmmmmmmmmm
Do you experience some bug because of this? Based on the way GTK does drawing this looks normal to me.
This seems to cause some performance problems for non-trivial ownerdrawn controls.
(In reply to Thomas Singer from comment #4) > This seems to cause some performance problems for non-trivial ownerdrawn > controls. Is this a regression in SWT or a general observation with GTK3?
This is a general observation about GTK3. I haven't compared to previous GTK/SWT versions. If, for example, an expensive repaint needs 50ms, the additional repaint events sum up to waste ~1s without any benefit. I would have expected at least the double-buffered control to ignore such unnecessary repaints.
The paint events were introduced in this commit: https://gitlab.gnome.org/GNOME/gtk/commit/8b85db08e55e4a34829129f74946497bc769d647 between GTK3.14 and 3.16. I'll keep investigating as to the cause.
Thanks, this is much appreciated.
Gerrit change https://git.eclipse.org/r/147730 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=7081cee06fc084501628dbf6ad48c5e95771a06d
(In reply to Eclipse Genie from comment #9) > Gerrit change https://git.eclipse.org/r/147730 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=7081cee06fc084501628dbf6ad48c5e95771a06d In master now. Should reduce the overhead of paint events in the general IDE by quite a bit.
Verified in I20190820-0600.