Opened 9 months ago

Last modified 6 days ago

#2949 reviewing defect

AutoResize of columns in ItemListView reduces GUI update performance massively

Reported by: swagner Owned by: swagner
Priority: high Milestone: HeuristicLab 3.3.16
Component: Core.Views Version:
Keywords: Cc:

Description

In r9755 of #1421 a call to AdjustListViewColumnSizes was added to Item_ToStringChanged in ItemListView, ItemCollectionView and ItemArrayView. AdjustListViewColumnChanges then calls AutoResize on all column headers. This change reduces GUI update performance massively.

Runtime tests with changes of r9755 (quad-core CPU):

  • single GA/TSP sample with SequentialEngine: 10 sec
  • single GA/TSP sample with SequentialEngine after showing all algorithm tabs once: 25 sec
  • 4 GA/TSP samples with SequentialEngine in parallel: 65 sec (each algorithm)
  • single GA/TSP sample in an experiment without showing algorithm view: 4 sec
  • 4 GA/TSP samples in an experiment with 4 workers without showing algorithm views: 5,5 sec (each algorithm)

Runtime tests without changes of r9755 (quad-core CPU):

  • single GA/TSP sample with SequentialEngine: 5 sec
  • single GA/TSP sample with SequentialEngine after showing all algorithm tabs once: 5 sec
  • 4 GA/TSP samples with SequentialEngine in parallel: 7 sec (each algorithm)
  • single GA/TSP sample in an experiment without showing algorithm view: 4 sec
  • 4 GA/TSP samples in an experiment with 4 workers without showing algorithm views: 5,5 sec (each algorithm)

Attachments (1)

viewchange.patch (3.9 KB) - added by abeham 6 weeks ago.

Download all attachments as: .zip

Change History (5)

Changed 6 weeks ago by abeham

comment:1 Changed 6 weeks ago by abeham

Don't know if there's a perfect solution. I was thinking about using TextRenderer.MeasureString and adjust only if the new string size was larger than the width of the column. I further added a change to perform measurestring only when the string contains more characters than before. See the patch if this improves speed. I tested with 4 algorithms side by side all having their results displayed on a dual core and they terminated in about 35s. When not showing the results a single GA finishes in 4.3s. When showing results in 13s.

comment:2 Changed 5 weeks ago by abeham

  • Owner set to swagner
  • Status changed from new to assigned

comment:3 Changed 6 days ago by abeham

  • Owner changed from swagner to abeham
  • Status changed from assigned to accepted

r17007: Remove resize event arising in selected index changed (very costly when many items are selected in a large list)

comment:4 Changed 6 days ago by abeham

  • Owner changed from abeham to swagner
  • Status changed from accepted to reviewing

r17008: Disable autosizing when there is only one column and use width of list view as size of column. In addition no update occurs on ToStringChanged when there is only one column (most common case)

Note: See TracTickets for help on using tickets.