Results 1 to 12 of 12

Thread: Rendering rectangles speed issue

Hybrid View

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

    Default Re: Rendering rectangles speed issue

    Quote Originally Posted by macbeth View Post
    Don't have any idea. The rects were added in less than 0.1 seconds to the scene, their rasterization took about 30secs, but I have no idea what is going on afterwards.
    Could you prepare a minimal compilable example, so I can test it too?

  2. #2
    Join Date
    Jul 2006
    Location
    Poprad/Prague
    Posts
    33
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default Re: Rendering rectangles speed issue

    Of course, just slightly modified portedcanvas example -- try to add rectangle using Edit menu (or Alt + R), it should draw +-100 000 rects (some of them maybe cut out) quite fast, but afterwards the cpu load remains high (according to top or KDE task manager), on my machie around 90%...

    here is an archive
    just try to run qmake && make/gmake on it, it should be compiled & able to run...

    and let me know how it works on your machine...

    And thank you for the fruitful discussion

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

    Default Re: Rendering rectangles speed issue

    On my machine it uses around 30% when idle, but when I drag items over the rectangles CPU utilization jumps to 70%--80% (according to top). I've commented out three lines in main() and now it uses less than 1% when I don't touch the items. Finding which lines should be commented out I leave to you

  4. #4
    Join Date
    Jul 2006
    Location
    Poprad/Prague
    Posts
    33
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Lightbulb Re: Rendering rectangles speed issue

    Well, I don't know what to say. I was searching for a timer in all other cpp files and did not find anything, supposing that main is just usual app.exec()... but as sherlock holmes said, if you foreclose all other possibilities, it must be the last one, even if it's almost improbable.

    Sorry, sometimes I don't see what's in front of me...

    And thanks, once more...

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.