https://bugs.kde.org/show_bug.cgi?id=398900
--- Comment #7 from Alexander Neundorf <neund...@kde.org> --- I'll give it a try. I had a closer look at the performance issue. The project were it is slow is quite big, it contains around 19.000 files. On the slow machine/installation, void KateQuickOpen::update() takes 10 seconds. All the time is spent in the loop which puts the project files into the model: foreach(const QString & file, projectFiles) My two installations (a relatively old version and one from current git) both run fast, here this loop over 19.000 files takes 100 milliseconds. I.e. it is 100 times faster. In the slow install, it seems like most of the time is spent when putting the two QStandardItems into the model. Below are three backtraces from within those 10 seconds. They are all QStandardItemPrivate::setChild() which emits QAbstractItemModel::layoutChanged(...). Updating a layout 19.000 times probably can take some time. This would be around 0.5 milliseconds per update. But why is it slow on one setup and fast on another ? Could this be related to the "environment", the window manager (fast with kwin, slow with i3 and xfce?), Qt options, X driver ? #0 0x00007ffff30d0d27 in QSortFilterProxyModelPrivate::create_mapping(this=this@entry=0x555556059490, source_parent=...) at itemmodels/qsortfilterproxymodel.cpp:375 #1 0x00007ffff30d15f9 in QSortFilterProxyModelPrivate::update_persistent_indexes(QVector<QPair<QModelIndex, QPersistentModelIndex> > const&) () at itemmodels/qsortfilterproxymodel.cpp:1079 #2 0x00007ffff30d1c79 in QSortFilterProxyModelPrivate::_q_sourceLayoutChanged (this=0x555556059490, sourceParents=..., hint=<optimized out>) at itemmodels/qsortfilterproxymodel.cpp:1454 #3 0x00007ffff30d6823 in QSortFilterProxyModel::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at itemmodels/qsortfilterproxymodel.h:174 #4 0x00007ffff311ae1e in QMetaObject::activate(QObject*, int, int, void**)() at kernel/qobject.cpp:3771 #5 0x00007ffff311b4ab in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7ffff337bbe0 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fffffffd3f0) at kernel/qobject.cpp:3633 #6 0x00007ffff30ae5ba in QAbstractItemModel::layoutChanged(this=<optimized out>, _t1=..., _t2=<optimized out>, _t2@entry=QAbstractItemModel::NoLayoutChangeHint) at .moc/moc_qabstractitemmodel.cpp:566 #7 0x00007ffff3ce89ae in QStandardItemPrivate::setChild(int, int, QStandardItem*, bool) () at itemmodels/qstandarditemmodel.cpp:147 #8 0x00005555555ca30c in KateQuickOpen::update (this=0x5555560493a0) at /usr/src/debug/kate-18.08.2-1.fc28.x86_64/kate/katequickopen.cpp:258 #9 0x00005555555944b4 in KateMainWindow::slotQuickOpen (this=0x555555a44fc0) at /usr/src/debug/kate-18.08.2-1.fc28.x86_64/kate/katemainwindow.cpp:1144 #0 0x00007ffff30be222 in mergeIndexes(QVector<QPersistentModelIndex> const&) () at itemmodels/qitemselectionmodel.cpp:967 #1 0x00007ffff30c4236 in QItemSelectionModelPrivate::_q_layoutChanged(QList<QPersistentModelIndex> const&, QAbstractItemModel::LayoutChangeHint) () at itemmodels/qitemselectionmodel.cpp:1085 #2 0x00007ffff30c489b in QItemSelectionModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () at itemmodels/qitemselectionmodel.h:148 #3 0x00007ffff311ae1e in QMetaObject::activate(QObject*, int, int, void**)() at kernel/qobject.cpp:3771 #4 0x00007ffff311b4ab in QMetaObject::activate(sender=sender@entry=0x5555560613c0, m=m@entry=0x7ffff337bbe0 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fffffffd260) at kernel/qobject.cpp:3633 #5 0x00007ffff30ae5ba in QAbstractItemModel::layoutChanged (this=this@entry=0x5555560613c0, _t1=..., _t2=<optimized out>, _t2@entry=QAbstractItemModel::NoLayoutChangeHint) at .moc/moc_qabstractitemmodel.cpp:566 #6 0x00007ffff30d1ca4 in QSortFilterProxyModelPrivate::_q_sourceLayoutChanged (this=0x55555605b480, sourceParents=..., hint=<optimized out>) at itemmodels/qsortfilterproxymodel.cpp:1463 #7 0x00007ffff30d6823 in QSortFilterProxyModel::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at itemmodels/qsortfilterproxymodel.h:174 #8 0x00007ffff311ae1e in QMetaObject::activate(QObject*, int, int, void**)() at kernel/qobject.cpp:3771 #9 0x00007ffff311b4ab in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7ffff337bbe0 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fffffffd3f0) at kernel/qobject.cpp:3633 #10 0x00007ffff30ae5ba in QAbstractItemModel::layoutChanged(this=<optimized out>, _t1=..., _t2=<optimized out>, _t2@entry=QAbstractItemModel::NoLayoutChangeHint) at .moc/moc_qabstractitemmodel.cpp:566 #11 0x00007ffff3ce89ae in QStandardItemPrivate::setChild(int, int, QStandardItem*, bool) () at itemmodels/qstandarditemmodel.cpp:147 #12 0x00005555555ca322 in KateQuickOpen::update (this=0x555556056380) at /usr/src/debug/kate-18.08.2-1.fc28.x86_64/kate/katequickopen.cpp:259 #13 0x00005555555944b4 in KateMainWindow::slotQuickOpen (this=0x555555a44270) at /usr/src/debug/kate-18.08.2-1.fc28.x86_64/kate/katemainwindow.cpp:1144 #0 0x00007ffff30ceb72 in QVector<int>::fill (asize=-1, from=<optimized out>, this=0x55555654ccb0) at ../../include/QtCore/../../src/corelib/tools/qarraydata.h:61 #1 QSortFilterProxyModelPrivate::build_source_to_proxy_mapping (this=this@entry=0x55555605a9d0, proxy_to_source=..., source_to_proxy=...) at itemmodels/qsortfilterproxymodel.cpp:1041 #2 0x00007ffff30d0eb5 in QSortFilterProxyModelPrivate::create_mapping(this=this@entry=0x55555605a9d0, source_parent=...) at itemmodels/qsortfilterproxymodel.cpp:395 #3 0x00007ffff30d15f9 in QSortFilterProxyModelPrivate::update_persistent_indexes(QVector<QPair<QModelIndex, QPersistentModelIndex> > const&) () at itemmodels/qsortfilterproxymodel.cpp:1079 #4 0x00007ffff30d1c79 in QSortFilterProxyModelPrivate::_q_sourceLayoutChanged (this=0x55555605a9d0, sourceParents=..., hint=<optimized out>) at itemmodels/qsortfilterproxymodel.cpp:1454 #5 0x00007ffff30d6823 in QSortFilterProxyModel::qt_static_metacall(_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at itemmodels/qsortfilterproxymodel.h:174 #6 0x00007ffff311ae1e in QMetaObject::activate(QObject*, int, int, void**) () at kernel/qobject.cpp:3771 #7 0x00007ffff311b4ab in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7ffff337bbe0 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fffffffd3f0) at kernel/qobject.cpp:3633 #8 0x00007ffff30ae5ba in QAbstractItemModel::layoutChanged (this=<optimized out>, _t1=..., _t2=<optimized out>, _t2@entry=QAbstractItemModel::NoLayoutChangeHint) at .moc/moc_qabstractitemmodel.cpp:566 #9 0x00007ffff3ce89ae in QStandardItemPrivate::setChild(int, int, QStandardItem*, bool) () at itemmodels/qstandarditemmodel.cpp:147 #10 0x00005555555ca322 in KateQuickOpen::update (this=0x555556055640) at /usr/src/debug/kate-18.08.2-1.fc28.x86_64/kate/katequickopen.cpp:259 #11 0x00005555555944b4 in KateMainWindow::slotQuickOpen (this=0x555555a443a0) at /usr/src/debug/kate-18.08.2-1.fc28.x86_64/kate/katemainwindow.cpp:1144 -- You are receiving this mail because: You are watching all bug changes.