Skip to content

[FIX] Fix slow clear/delete in 'Heat Map' 'Hier. Clustering', 'Distance Map'#4365

Merged
thocevar merged 9 commits intobiolab:masterfrom
ales-erjavec:graphics-text-list
Feb 3, 2020
Merged

[FIX] Fix slow clear/delete in 'Heat Map' 'Hier. Clustering', 'Distance Map'#4365
thocevar merged 9 commits intobiolab:masterfrom
ales-erjavec:graphics-text-list

Conversation

@ales-erjavec
Copy link
Contributor

Issue

owheatmap, owdistancemap and owhierarchicalclustering use QGraphicsLinearLayout to position text labels in a list. Clearing the QGraphicsLinearLayout however is slow (seems to be another quadratic time complexity).

Extract a more limited (but sufficient) TextListWidget from owsilhouetteplot and replace the use of QGraphicsLinearLayout.

Fixes gh-2663
Fixes gh-4349

Description of changes
  • extract and extend the TextListWidget from owsilhouetteplot
  • use the TextListWidget in owheatmap, owhierarchiclustering, owdistancemap
Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Jan 24, 2020

Codecov Report

Merging #4365 into master will increase coverage by 0.05%.
The diff coverage is 98%.

@@            Coverage Diff             @@
##           master    #4365      +/-   ##
==========================================
+ Coverage   87.13%   87.18%   +0.05%     
==========================================
  Files         399      401       +2     
  Lines       72901    72931      +30     
==========================================
+ Hits        63521    63585      +64     
+ Misses       9380     9346      -34

@ales-erjavec ales-erjavec force-pushed the graphics-text-list branch 2 times, most recently from 2e558e3 to 829facd Compare January 27, 2020 10:41
@thocevar
Copy link
Contributor

Heat map visualizations with a lot of rows (e.g., Adult dataset) are now besides being faster to delete also faster to construct.

Distance map contains a quadratic number of elements anyway, therefore the difference is not that obvious.

Hierarchical clustering must be doing something strange besides this. It should containt a linear number of elements but is still slow to delete. I don't think it solves #2663.

@thocevar thocevar merged commit 1c84566 into biolab:master Feb 3, 2020
@ales-erjavec ales-erjavec deleted the graphics-text-list branch March 16, 2020 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Heat Map: slow on delete OWHierarchialClustering: HC computes sth even once the data is removed

2 participants