Results 1 to 4 of 4

Thread: Transition of an app Qt 4.x to Qt 5 - QTreeView problem

  1. #1
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default 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
    Last edited by Qiieha; 2nd September 2013 at 11:42.

  2. #2
    Join Date
    Mar 2010
    Location
    Berlin
    Posts
    19
    Qt products
    Qt4
    Platforms
    Windows

    Default 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.

  3. #3
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default 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...
    Attached Images Attached Images
    Last edited by Qiieha; 2nd September 2013 at 13:09.

  4. #4
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default 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

Similar Threads

  1. Replies: 1
    Last Post: 28th June 2012, 16:32
  2. Replies: 1
    Last Post: 15th March 2012, 15:34
  3. Replies: 2
    Last Post: 16th November 2010, 06:11
  4. Transition from QMainWindow to QWidget
    By Sabre Runner in forum Newbie
    Replies: 5
    Last Post: 12th October 2010, 16:05
  5. Qt3 to Qt4 transition, setWindowIcon() problems
    By watashi16 in forum Qt Programming
    Replies: 5
    Last Post: 13th December 2007, 20:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.