ednakram
30th March 2018, 22:55
Hi All,
I have a model that has 8 million rows and the data is shown using a QTAbleView. There is a QSortFilterProxyModel to filter the rows.
Problem is that when filtering, leads to the GUI freezing for several minutes (maybe infinitely - even freezes the VNC session itself).
The process shows the following stack trace. It looks like the vertical header is responding to all of the rowsRemoved signals emitted from the proxy model in it's slot - QHeaderViewPrivate::_q_sectionsRemoved
Do note that vertical header itself is hidden but still that doesn't prevent the calculation to happen in the slot QHeaderViewPrivate::_q_sectionsRemoved.
Currently there is no way to remove a vertical header from the QTableView - QTable::setHorizontalHeader returns if passed a nullptr.
Any suggestions of how to deal with this?
(also is there is likelihood of hitting other issues even if this one is resolved given the order of the data?).
Thanks in advance for the help.
Thread 1 (Thread 0x2ad8ac45acc0 (LWP 17625)):
#0 0x00002ad8abae108c in QHeaderView::isSectionHidden(int) const () from /build/Linux64/lib/libQtGui.so.4
#1 0x00002ad8abae2de6 in ?? () from /build/Linux64/lib/libQtGui.so.4
#2 0x00002ad8abae4b08 in ?? () from /build/Linux64/lib/libQtGui.so.4
#3 0x00002ad8abaed76c in QHeaderView::qt_metacall(QMetaObject::Call, int, void**) () from /build/Linux64/lib/libQtGui.so.4
#4 0x00002ad8aa9ec77f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /build/Linux64/lib/libQtCore.so.4
#5 0x00002ad8aaa31064 in QAbstractItemModel::rowsRemoved(QModelIndex const&, int, int) () from /build/Linux64/lib/libQtCore.so.4
#6 0x00002ad8aa9d6bd7 in QAbstractItemModel::endRemoveRows() () from /build/Linux64/lib/libQtCore.so.4
#7 0x00002ad8abb53be0 in ?? () from /build/Linux64/lib/libQtGui.so.4
#8 0x00002ad8abb54304 in ?? () from /build/Linux64/lib/libQtGui.so.4
#9 0x00002ad8abb547b1 in ?? () from /build/Linux64/lib/libQtGui.so.4
#10 0x00002ad8abb54d51 in QSortFilterProxyModel::invalidateFilter() () from /build/Linux64/lib/libQtGui.so.4
#11 0x000000000103b5fa in ?? ()
#12 0x0000000000b45803 in ?? ()
#13 0x0000000000c02688 in ?? ()
I have a model that has 8 million rows and the data is shown using a QTAbleView. There is a QSortFilterProxyModel to filter the rows.
Problem is that when filtering, leads to the GUI freezing for several minutes (maybe infinitely - even freezes the VNC session itself).
The process shows the following stack trace. It looks like the vertical header is responding to all of the rowsRemoved signals emitted from the proxy model in it's slot - QHeaderViewPrivate::_q_sectionsRemoved
Do note that vertical header itself is hidden but still that doesn't prevent the calculation to happen in the slot QHeaderViewPrivate::_q_sectionsRemoved.
Currently there is no way to remove a vertical header from the QTableView - QTable::setHorizontalHeader returns if passed a nullptr.
Any suggestions of how to deal with this?
(also is there is likelihood of hitting other issues even if this one is resolved given the order of the data?).
Thanks in advance for the help.
Thread 1 (Thread 0x2ad8ac45acc0 (LWP 17625)):
#0 0x00002ad8abae108c in QHeaderView::isSectionHidden(int) const () from /build/Linux64/lib/libQtGui.so.4
#1 0x00002ad8abae2de6 in ?? () from /build/Linux64/lib/libQtGui.so.4
#2 0x00002ad8abae4b08 in ?? () from /build/Linux64/lib/libQtGui.so.4
#3 0x00002ad8abaed76c in QHeaderView::qt_metacall(QMetaObject::Call, int, void**) () from /build/Linux64/lib/libQtGui.so.4
#4 0x00002ad8aa9ec77f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /build/Linux64/lib/libQtCore.so.4
#5 0x00002ad8aaa31064 in QAbstractItemModel::rowsRemoved(QModelIndex const&, int, int) () from /build/Linux64/lib/libQtCore.so.4
#6 0x00002ad8aa9d6bd7 in QAbstractItemModel::endRemoveRows() () from /build/Linux64/lib/libQtCore.so.4
#7 0x00002ad8abb53be0 in ?? () from /build/Linux64/lib/libQtGui.so.4
#8 0x00002ad8abb54304 in ?? () from /build/Linux64/lib/libQtGui.so.4
#9 0x00002ad8abb547b1 in ?? () from /build/Linux64/lib/libQtGui.so.4
#10 0x00002ad8abb54d51 in QSortFilterProxyModel::invalidateFilter() () from /build/Linux64/lib/libQtGui.so.4
#11 0x000000000103b5fa in ?? ()
#12 0x0000000000b45803 in ?? ()
#13 0x0000000000c02688 in ?? ()