Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Distance Matrix: Fix freeze with large selections #5176

Merged
merged 7 commits into from
Jan 22, 2021

Conversation

ales-erjavec
Copy link
Contributor

Issue

Selecting all items (ctrl+a) in Distance Matrix freezes on large inputs (~4000x4000).

Builds on top of gh-5164

Description of changes

Optimize SymmetricSelectionModel to operate on selection ranges not individual indices.
Refactor/extract BlockSelectionModel and SymmetricSelectionModel into utility module.

Includes
  • Code changes
  • Tests
  • Documentation

Reimplement QHeaderView.paintSection to avoid expensive calls to
QItemSelectionModel.isRowSelected.
@codecov
Copy link

codecov bot commented Jan 12, 2021

Codecov Report

Merging #5176 (1b95643) into master (1d2626e) will increase coverage by 0.09%.
The diff coverage is 96.55%.

@@            Coverage Diff             @@
##           master    #5176      +/-   ##
==========================================
+ Coverage   84.79%   84.88%   +0.09%     
==========================================
  Files         286      289       +3     
  Lines       60189    60376     +187     
==========================================
+ Hits        51036    51249     +213     
+ Misses       9153     9127      -26     

@ales-erjavec ales-erjavec changed the title [FIX] Distance Matrix: Fix frezee with large selections [FIX] Distance Matrix: Fix freeze with large selections Jan 12, 2021
@ales-erjavec ales-erjavec force-pushed the distance-matrix-selection-model branch from e6710c0 to 5f3202a Compare January 12, 2021 13:40
@ales-erjavec ales-erjavec force-pushed the distance-matrix-selection-model branch from 5f3202a to 16ebd0f Compare January 12, 2021 13:50
@ales-erjavec ales-erjavec force-pushed the distance-matrix-selection-model branch from 16ebd0f to 1b95643 Compare January 12, 2021 14:38
@ales-erjavec ales-erjavec marked this pull request as ready for review January 15, 2021 11:14
@janezd janezd self-assigned this Jan 22, 2021
@janezd janezd merged commit 5236e3b into biolab:master Jan 22, 2021
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.

2 participants