Skip to content
This repository was archived by the owner on May 13, 2020. It is now read-only.
This repository was archived by the owner on May 13, 2020. It is now read-only.

Improve widget loading speed #2

Open
@leocov-dev

Description

@leocov-dev

Problem:
Currently I create all the widgets (about 3000) on initializing the window. Qt delays drawing the widgets until the system has completed other script executions. This makes it hard to provide user feedback about why Maya seems frozen for a number of seconds (around 15-30) because all progress bars, etc. have already finished rendering.

Enhancement:
It will probably be much more responsive to only instantiate and render the widgets that can fill the current window 'frame' given a specific position on the scroll bar.
I need to:

  • remove the QScrollArea and just use a generic resizable QWidget as a 'frame'
  • use a vertical scroll bar on its own that is only used to define the current 'frame'
  • calculate the current visible widgets based on
    • the scroll bar position
    • the fixed size of the widgets
    • the fixed size of the layout spacing
  • move the widgets interactively as the scroll bar moves
  • destroy widgets that pass outside the current 'frame'
  • instantiate widgets that enter the current 'frame'

Questions:

  • Is it expensive to move a widget?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions