Free cookie consent management tool by TermsFeed Policy Generator

Opened 6 years ago

Closed 5 years ago

#2949 closed defect (done)

AutoResize of columns in ItemListView reduces GUI update performance massively

Reported by: swagner Owned by: abeham
Priority: high Milestone: HeuristicLab 3.3.16
Component: Core.Views Version: trunk
Keywords: merged 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 years ago.

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by abeham

comment:1 Changed 6 years 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 6 years ago by abeham

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

comment:3 Changed 5 years 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 5 years 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)

comment:5 Changed 5 years ago by abeham

  • Version set to trunk

comment:6 Changed 5 years ago by abeham

r17118: Fixed sorting in ItemCollectionView

  • Sorting was broken in r17007:17008. It worked previously, because AutoResize probably put the control in a different mode (very likely that it incurred some painting). After removing AutoResize the control is now in a different mode where it doesn't actually sort the items. The items are now added in sorted order instead of inserting them in their given order and then sorting them in the view. This should be faster and have the same effect.

comment:7 Changed 5 years ago by swagner

Reviewed r17007, r17008, r17118. Changes look good, thanks. After these changes, runtime is on the level again on which it was before r9755.

comment:8 Changed 5 years ago by swagner

r17124: Merged r17007, r17008, r17118 from trunk into stable

comment:9 Changed 5 years ago by swagner

  • Keywords merged added
  • Owner changed from swagner to abeham
  • Status changed from reviewing to readytorelease

comment:10 Changed 5 years ago by abeham

  • Resolution set to done
  • Status changed from readytorelease to closed
Note: See TracTickets for help on using tickets.