Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Issue regarding performance prior 5.11.1 and after 5.11.2



  • Hello everyone,

    This is my first time posting and I'm hoping someone can help me or event better help Qt. I published a bug (https://bugreports.qt.io/browse/QTBUG-78324) in the Qt bug report system. The issue is when trying to use QStandardItemModel::removeRows, it is extremely fast in Qt versions 5.11.1 and prior, whereas in 5.11.2 and after it is extremely slow. 5.11.1 and before it would take a fraction of a second to remove 40,000 rows. In 5.11.2 and up, it takes many minutes. I read in the release notes for 5.11.2 that changes were made to make releases prior to 5.11.2 compatible with 5.11.2 and up. Not sure if it is a build issue or something else. The ticket has an attached project where I simply add rows to a model and remove them. You can see the difference in performance. I used qtcreator to create the example.

    Currently my release is on hold until this issue gets resolved. My software requires fast performance for writing and removing rows to a view. Everything was fine until I tried using 5.11.2 and up. Even 5.12 and 13 is slow. The ticket was upgraded to important and regression.

    If it is a build issue perhaps someone can tell me what we can do or do I have to wait for a fix from Qt?

    Any help would be appreciated.


  • Lifetime Qt Champion

    @leinad said in Issue regarding performance prior 5.11.1 and after 5.11.2:

    My software requires fast performance for writing and removing rows to a view

    Apart from the rest but when you need performance - why do you use a convenience model instead a custom model derived from QAbstractItemModel?



  • I'm relatively new to Qt and C++ in general and I did not know then what I know now. But in any event the standarditemmodel works just fine since my release went out 6 months ago (using 5.6.0) with the performance I expected. No need to fix what it not broken. My problems began with 5.11.2.

    I did find out more information. I ran my test program in the debugger and also managed through step through the Qt code for the removeRows method. It appears that in 5.11.2 there are no pdb files whereas in 5.11.1 and before there are. I then compared the code for 5.11.1 and 5.11.2 and it matches exactly for that method so it must be something related to the new build system they put in place. Any ideas of how to fix it?


Log in to reply