Skip to content

Improve performance when switching between main window and undocked dialogs (make GtkStack inhomogeneous)

Patrick Storz requested to merge ede123/inkscape:inhomogeneous_stack into master

I noticed that there's some significant delay when switching between the main window and undocked dialogs (e.g. the XML editor).

A large part of this delay is caused by the "Tool Controls Bar": Hiding it makes the delay significantly smaller.

This MR sets the hhomogeneous/vhomogeneous properties of the GtkStack holding all the toolbars to false:

  • Pro: Only the active toolbar has to be considered for re-layouting, which seems to increase performance significantly.
  • Con: Potentially width/height of the toolbar could change when switching tools. In practive with Adwaita theme this does not seem to be the case, though. Please test on other OSs / with other themes, though.

I've not been able to figure out yet, why it is slow in the first place. Hiding the toolbar completely still has a non-negligible effect on the (smaller, but still present) delay when switching windows.

Edited by Patrick Storz

Merge request reports