Denis Auroux twisted the bytes to say:
Denis> Hi Daniel, Denis> If there's some reasonably easy explanation, can you briefly describe Denis> what's the key point in improving responsiveness -- does it involve some Denis> actual optimization and writing serious code, or is it just changing Denis> some gtk or canvas parameters? In case I ever get to it and hit the Denis> same issue in a different place... Hi Denis, In a nutshell. The main issue we hit was called "event compression". Given that displays can only refresh every few ms, gtk3 decided to drop events between callbacks. This meant that only one drawing event was recorded per every 20-30 ms. Not fast enough for writing. The solution implemented in GTK3 was to disable this compression using gdk_window_get_event_compression (gdk_window)); The problem I had was that this function does not work until the window is realized (after the call to gtk_widget_show_all (window); The ideal way, from a performance point of view, seems to, at each callback: 1. Record the current operation. 2. Invalidate the area in the canvas. Then, the draw will be called only once refresh, updating the canvas. At least that works in theory. see the program motion-snake.c for an example: https://github.com/dmgerman/testDrawing I have not look at the gtk3 code in a very long time, though. Denis> Denis Denis> On 08/04/2016 07:55 PM, dmg wrote: >> Just to add to this discussion. >> >> I finally figured out how to improve responsiveness on gtk3. I looked at >> mypaint >> and the way they resolved the same I issue I had. I have been doing some >> tests that look very promising, but I have not have time to test it with >> the gtk3 >> branch of xournal >> >> In theory, the gtk3 branch is almost complete, but it might have a >> couple of lingering >> bugs that need to be addressed before it can be used for "production". >> >> --dmg Denis> -- Denis> Denis Auroux Denis> UC Berkeley, Department of Mathematics Denis> 817 Evans Hall, Berkeley CA 94720-3840, USA Denis> aur...@math.berkeley.edu Denis> ------------------------------------------------------------------------------ Denis> _______________________________________________ Denis> Xournal-devel mailing list Denis> Xournal-devel@lists.sourceforge.net Denis> https://lists.sourceforge.net/lists/listinfo/xournal-devel -- Daniel M. German "Heisenbug is a bug that disappears or alters its behavior when one Jargon Dictionary -> attempts to probe or isolate it." http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with . ------------------------------------------------------------------------------ _______________________________________________ Xournal-devel mailing list Xournal-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xournal-devel