Skip to content

[ENH] Variable lists (with QListView) optimizations#2994

Merged
markotoplak merged 7 commits intobiolab:masterfrom
ales-erjavec:model-views-optimizations
Apr 13, 2018
Merged

[ENH] Variable lists (with QListView) optimizations#2994
markotoplak merged 7 commits intobiolab:masterfrom
ales-erjavec:model-views-optimizations

Conversation

@ales-erjavec
Copy link
Copy Markdown
Contributor

Issue

Variable selection/display or large (wide) tables is slow.

Related to gh-2972

Description of changes
  • Set uniformItemSizes property on QListViews where appropriate
  • Remove reimplementation of PyListModel.index. The default implementations in QAbstractListItemModel is sufficient and faster (it does call rowCount once for every created index).
Includes
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link
Copy Markdown

codecov-io commented Apr 11, 2018

Codecov Report

Merging #2994 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2994      +/-   ##
==========================================
+ Coverage   81.88%   81.88%   +<.01%     
==========================================
  Files         329      329              
  Lines       56867    56871       +4     
==========================================
+ Hits        46564    46568       +4     
  Misses      10303    10303

The default implementations in QAbstractListItemModel is sufficient
and faster ('index' in particular is on a hot path in the Qt
model/view framework so it needs to be fast)
... when the displayed model is empty.
@ales-erjavec ales-erjavec force-pushed the model-views-optimizations branch from d1c26fd to 1a75370 Compare April 12, 2018 07:31
@markotoplak markotoplak changed the title [ENH] Model/view optimizations [ENH] Variable lists optimizations Apr 13, 2018
@markotoplak markotoplak changed the title [ENH] Variable lists optimizations [ENH] Variable lists (with QListView) optimizations Apr 13, 2018
@markotoplak markotoplak merged commit 1f55179 into biolab:master Apr 13, 2018
@ales-erjavec ales-erjavec deleted the model-views-optimizations branch April 17, 2018 14:31
@PrimozGodec PrimozGodec added this to the 3.13 milestone Apr 17, 2018
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.

4 participants