Results 1 to 17 of 17

Thread: graphicsview performance problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: graphicsview performance problem

    I never used a profiler.
    i tried it with "sleepy", an oo project, but he said 47% of 50% processor load are from KiFastSystemCallRet.
    WTF IS THAT? I think i know now why i hate developing under windows....

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

    Default Re: graphicsview performance problem

    I suggest trying callgrind or gprof under Linux.

  3. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: graphicsview performance problem

    Quote Originally Posted by wysota View Post
    I suggest trying callgrind or gprof under Linux.
    Well, the problem was described as a Windows only problem.

    Try to render the scene to a QImage, because QImage uses the same paint engine on all platforms, that is used on Windows. If you see the same performance problems with QImage/Linux you can use the tools Witold recommended.

    Most paint engines are frontends to native paint subsystems like X11, but the raster paint engine is a new development in Qt4. So its no surprise, that many problems ( and performance issues ) are related to it.

    Uwe

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: graphicsview performance problem

    Quote Originally Posted by Uwe View Post
    Well, the problem was described as a Windows only problem.
    I would say that the problem is simply hard to notice on better systems.

    A not-so-random quote from the sources:
    Qt Code:
    1. timerId = startTimer( 1000 / 1000 );
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: graphicsview performance problem

    that was a test. normally its 1000/25 for 25 fps.
    but it doesnt matter, if its 1 or 40. after 1500 particles the scene becomes pretty slow. and the processor load wents to the 50%.
    i saw other particle systems with more than 9000 particles and more graphics, which didn't have such a performance problem.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: graphicsview performance problem

    Quote Originally Posted by kernel_panic View Post
    that was a test. normally its 1000/25 for 25 fps.
    That's better. What else did you change?

    Quote Originally Posted by kernel_panic View Post
    i saw other particle systems with more than 9000 particles and more graphics, which didn't have such a performance problem.
    Then use a profiler and see what's eating your CPU power.

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

    Default Re: graphicsview performance problem

    Quote Originally Posted by Uwe View Post
    Well, the problem was described as a Windows only problem.

    Try to render the scene to a QImage, because QImage uses the same paint engine on all platforms, that is used on Windows. If you see the same performance problems with QImage/Linux you can use the tools Witold recommended.

    Most paint engines are frontends to native paint subsystems like X11, but the raster paint engine is a new development in Qt4. So its no surprise, that many problems ( and performance issues ) are related to it.
    He is rendering to QGLWidget, so I doubt the OS matters when speaking about paint engines - all use the GL paint engine.

    A profiler was suggested to be used to find a bottleneck within the application code and not Qt, so again the system doesn't matter - Jacek suggests putting some "const" modifiers so the influence of internals of the framework is minimal.

    @kernel_panic: Were those systems painting pixmaps? I'm sure you can render several thousand particles when using pure OpenGL (not QPainter interface to the GL paint engine) and you can probably boost the performance even more by pushing some of the calculations to the GPU (for example using fragment programs).

  8. #8
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: graphicsview performance problem

    yeah. this sounds nice, but i dont know how to translate it into pure opengl. i never used it.
    the examples i saw where in pure opnegl and rendered textures onto the particles. but i need it in a qt-app, so i cant use this code...

Similar Threads

  1. GraphicsView rotate problem
    By forrestfsu in forum Qt Programming
    Replies: 7
    Last Post: 21st November 2007, 20:20
  2. GraphicsView performance
    By nileshsince1980 in forum Qt Programming
    Replies: 2
    Last Post: 19th September 2007, 12:19
  3. QTableView Performance Problem on Windows
    By umitoz in forum Qt Programming
    Replies: 1
    Last Post: 31st August 2007, 16:47
  4. GraphicsView performance problems
    By Gopala Krishna in forum Qt Programming
    Replies: 79
    Last Post: 8th August 2007, 17:32
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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
  •  
Qt is a trademark of The Qt Company.