Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Dealing with lots of objects is very slow

Dealing with lots of objects is very slow

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 402 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NiteShad0w
    wrote on last edited by
    #1

    So i am making a music app (like MusicBee) and am dealing with relatively big amount of QLabels in a QSplitter (5 widgets in splitter, each one is like a column filled with labels). Each column represents some type of information certain audio file has in its tags (album, artist, title, year, etc.). Column is filled when it has around 70 labels, so around 350 labels are visible to user but user can scroll down at any time to see other files' info. The thing is that there is a lag spike when i try to load more than 200 songs (when its 2000 user has to wait more than 10 seconds). Is there any way to improve the performance to make it faster? i tried saving those objects in a list a dict and then getting them depending on which group of files' info needs to be shown, but it barely helps since most of the time is probably spent on drawing that stuff…

    Pl45m4P 1 Reply Last reply
    0
    • N NiteShad0w

      So i am making a music app (like MusicBee) and am dealing with relatively big amount of QLabels in a QSplitter (5 widgets in splitter, each one is like a column filled with labels). Each column represents some type of information certain audio file has in its tags (album, artist, title, year, etc.). Column is filled when it has around 70 labels, so around 350 labels are visible to user but user can scroll down at any time to see other files' info. The thing is that there is a lag spike when i try to load more than 200 songs (when its 2000 user has to wait more than 10 seconds). Is there any way to improve the performance to make it faster? i tried saving those objects in a list a dict and then getting them depending on which group of files' info needs to be shown, but it barely helps since most of the time is probably spent on drawing that stuff…

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @NiteShad0w

      Why not use something like a QListView or QTableView?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      4
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        That many labels are heavy to draw.
        A listView / Table with a delegate will be much faster.
        Look at
        https://forum.qt.io/topic/62363/custom-delegate/3
        for starter code.

        1 Reply Last reply
        2

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved