Results 1 to 2 of 2

Thread: beginRemoveRows and endRemoveRows very slow with large data sets.

  1. #1
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4

    Default beginRemoveRows and endRemoveRows very slow with large data sets.

    I have a table model created from QAbstractTableModel and it works fine with small amounts of data less then 1000. I have certain cases where I can have over 32,000 rows in a table. When I make a call to beginRemoveRows and endRemoveRows it takes over 10 milliseconds for the call to complete. Why is it taking so long? Is there any way I can speed this up?

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: beginRemoveRows and endRemoveRows very slow with large data sets.

    Tip 1:
    Use setUpdatesEnabled on the widget showing the model. Set it to false before changing the model and to true after changing.

    Tip 2:
    Set uniform row heights to true (if possible for your situation)

    Question:
    What are you using to view the table? A QTableView?

Similar Threads

  1. QAbstractItemModel::beginRemoveRows/endRemoveRows
    By SiS-Shadowman in forum Qt Programming
    Replies: 0
    Last Post: 12th July 2010, 09:56
  2. Replies: 6
    Last Post: 13th January 2010, 19:44
  3. Replot large wav file data
    By Sachtech in forum Qwt
    Replies: 1
    Last Post: 6th January 2009, 10:12
  4. Creating images from sets of data.
    By maverick_pol in forum Qt Programming
    Replies: 5
    Last Post: 26th February 2008, 10:25
  5. QWT and large amounts of data
    By ko9 in forum Qwt
    Replies: 1
    Last Post: 17th October 2007, 06:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.