Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt QGraphicsScene memory consumption
Forum Updated to NodeBB v4.3 + New Features

Qt QGraphicsScene memory consumption

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 922 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Konstantin_85K Offline
    Konstantin_85K Offline
    Konstantin_85
    wrote on last edited by
    #1

    I have application based on QGraphicsScene. I have more then 40k objects on it. And when i'm zoom in and zoom out and move scene i saw that my app use more and more memory(using "top | grep mayApp ").
    Then i take a simple example "Chip" from basic Qt examples. And try to zoom in, zoom out and move. And I get the similar behavior. App Chip eats more and more memory. What does it means ? And how to solve memory consumption issue ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What version of Qt ? What OS ?

      One thing you can do is profile the application using e.g. Valgrind.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Konstantin_85K Offline
        Konstantin_85K Offline
        Konstantin_85
        wrote on last edited by Konstantin_85
        #3

        It's reproduce on Ubunru,RedHat and Windows. Uses Qt 4.8 and Qt 5.5. Valgrind says nothing. But Chip application can eat more then 90mb of memory ease. Start memory usage ~30 mb.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Part of the memory use pattern comes from the number of chip on screen. So if you are showing your window bigger you will also have more chip in the four quadrant.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved