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

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

Merged
merged 7 commits into from
Apr 13, 2018

Conversation

ales-erjavec
Copy link
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

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.
@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