On Thursday 12 February 2009 12:26:34 Adeodato Simó wrote: > Hello, Hi,
> I've been suffering some serious performance problems with Qt 4.4 and a > QAbstractItemModel + QTreeView + QSortFilterProxyModel. Before creating > a test case and submit a bug, I tried Qt 4.5-rc1: the good news is that > the problem is gone; the bad news is that I'm experiencing a different > performance problem now. I'll explain both in more detail now, thanks in > advance for your attention! (Feel free to skip to point #2 directly.) > > 1. The old problem > ================== [...] This was indeed a known problem which has been fixed. > 2. The new problem > ================== > > I load data into my model in the background, calling begin/endInsertRows > as appropriate. With Qt 4.4 this was a reasonably fast operation, but > with 4.5-rc1 it has become very slow, apparently because the number of > calls to my data/index/rowCount has increased by an order of magnitude. > Compare: > > Function | 4.4 | 4.5-rc1 > =========+=======+========= > data | 1248 | 30736 > index | 9006 | 47662 > rowCount | 10243 | 48899 > > If I don't call begin/endInsertRows, and just do a model.reset() when > all the data has been loaded, I get: > > Function | 4.4 | 4.5-rc1 > =========+======+========= > data | 1064 | 900 > index | 1316 | 1160 > rowCount | 1319 | 1163 > > Can somebody help me figure out what's going on? It's difficult to say anything without any testcase. Many speed optimisations have been done. But it is assumed that the call to the data index and rowcount are relatively fast. If you can give me a example i can use to reproduce, I'll be able to profile it. Regards -- Olivier _______________________________________________ Qt4-preview-feedback mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback
