Transition of an app Qt 4.x to Qt 5 - QTreeView problem
Hi,
I developed an application, which uses QTreeView (Model-View).
If I compile the same application on same machine with Qt 4.8 the performance of QTreeView is great, but if I compile the application with Qt 5.1 the performance is very very bad.
Example: Open QTreeView with 15000 rows takes 3 secs with Qt 4.8.
Compiled with Qt 5.1 it takes 10 times longer.
What can be the reason. The model is programmed correctly with lots of optimizing.
It is really annoying, because i invested lots of time in transition. It is a complex application.
Edit: I tested this on linux(gcc) and windows(mingw). The behaviour is the same.
thank you
Re: Transition of an app Qt 4.x to Qt 5 - QTreeView problem
You could fire up a profiler like gprof. It will give you a better idea on where the problem lies.
1 Attachment(s)
Re: Transition of an app Qt 4.x to Qt 5 - QTreeView problem
I tried that with valgrind profiling. It seems that index() takes a lot of time...
Re: Transition of an app Qt 4.x to Qt 5 - QTreeView problem
I benchmarket the same operation on 4.8.1 and 5.1.0.
result:
4.8.1 most time-intensive function: libQtCore.so.4.8.1: called: 1542059 | times | own costs: 91415945
5.0.1 most time-intensive function: libQtCore.so.5.1.0: called: 244187237 | times | own costs: 13.620.601.683
I have to go back to 4.8.1