Results 1 to 13 of 13

Thread: Perfomance of Qt Gui Application on Windows

  1. #1
    Join Date
    Sep 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Perfomance of Qt Gui Application on Windows

    Hi
    I developed a gui application on linux. The performance on Linux is very good.
    But if I compile the program on Windows Xp(MinGW), the performance is very bad.

    It seems, that the filling of a QTableWidget with QWidgetItems is very slow on Windows (about 10 times slower, than on Linux).

    Maybe you know, how I can work around the problem. Can I optimize the compiler? Or should I try a different compiler (i.e intel c++, ...)?

    thank u

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Perfomance of Qt Gui Application on Windows

    I don't think this is related to the compiler. We're running our software on Windows and we haven't experienced such behaviour. Try profiling your program to see where the slowdown comes from.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Perfomance of Qt Gui Application on Windows

    thank u for reply. OK.
    But the inserting is definitely slower on windows.
    Qt Code:
    1. //f.e.:
    2. int num = 54212;
    3. item->setData(Qt::DisplayRole,num);
    4. mytable->setItem(row,column,item);
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Perfomance of Qt Gui Application on Windows

    How do you know it is slower?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Sep 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Perfomance of Qt Gui Application on Windows

    Because I tested it on both platforms and that was the result.
    But I'll test it once again and post code tomorrow.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Perfomance of Qt Gui Application on Windows

    But how do you know this particular code is slower?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Sep 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Perfomance of Qt Gui Application on Windows

    I don't know that this particular code is slower.
    I guess it. But I'm quite certain that the filling takes more time...

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Perfomance of Qt Gui Application on Windows

    So don't guess, benchmark it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Jun 2011
    Posts
    56
    Thanks
    7
    Qt products
    Qt4

    Default Re: Perfomance of Qt Gui Application on Windows

    I've had a similar problem. The solution was to switch from QTreeWidget to QTreeView, maybe the same applies to QTableWidget.

  10. #10
    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: Perfomance of Qt Gui Application on Windows

    Install the latest MinGW.

  11. #11
    Join Date
    Sep 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Perfomance of Qt Gui Application on Windows

    I tested it again:
    Fill QTableWidget with 20000 rows(3 columns):
    Linux: about 3 sec
    Windows: about 5 min

    Then I tried it on a different windows machine. I installed the latest QtCreator and QtLibs and compiled the app. Now it was as fast as on Linux.
    But I don't know yet, what's the problem on the first machine. But my problem is solved...

  12. #12
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Perfomance of Qt Gui Application on Windows

    have you made sure you ar ecomparing release builds with all iterator checking etc turned off?

  13. #13
    Join Date
    Sep 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Perfomance of Qt Gui Application on Windows

    I tested it with the releases and the debugs, the occurrence was everytime the same...

Similar Threads

  1. How to test Graphics perfomance
    By moh.gup@gmail.com in forum Qt Programming
    Replies: 1
    Last Post: 4th May 2011, 19:41
  2. Replies: 2
    Last Post: 20th September 2010, 17:18
  3. Replies: 3
    Last Post: 12th July 2010, 06:25
  4. QTableView perfomance 2
    By hml in forum Newbie
    Replies: 6
    Last Post: 28th March 2010, 22:51

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.