Skip to content

I20190111-1800

@Bananeweizen Bananeweizen tagged this 11 Jan 14:54
The performance of ContainerCheckedTreeViewer is very bad, when updating
the checked state of many of the items at the same time. If a single
checkbox is set checked or unchecked, all the parents and all the
children of that checkbox are updated. Therefore when setting the
checked state of all checkboxes (due to restoring the state of the
viewer after some filtering or similar), many of the parents and many of
the children are updated multiple times.

This change improves performance in multiple ways:
* use setRedraw() to disable repainting while multiple items are updated
in loops
* shorten the traversal over parents and children by detecting when
there will be no changes anymore to the state of the further parents or
children
* reimplement the update loop for setting the state of multiple items,
and calculate all the affected children and parents which need to be
updated once, such that their windows controls are updated only once
overall, and not once per modified item.

Overall, this makes the target platform editor content tab way more
responsive.

Change-Id: I63aa467bf875738af919a748bb33a8e22bd9cf49
Also-by: Karsten Thoms <karsten.thoms@itemis.de>
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Assets 2
Loading