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. Memory Consumption Issue

Memory Consumption Issue

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 681 Views
  • 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.
  • M Offline
    M Offline
    manuelschneid3r
    wrote on last edited by manuelschneid3r
    #1

    I'm encountering a memory consumption issue with my Qt application, specifically a simple keyboard launcher. The application consists of an input line and a list view. Despite the simplicity of the application, I'm encountering a absurd memory consumption issue. (400mb)

    I'd appreciate any guidance on how to optimize the memory usage of my Qt application. Are there any strategies or best practices I should follow to reduce memory consumption? Any help or suggestions would be greatly appreciated.

    Bildschirmfoto 2024-04-21 um 09.29.21.png

    There are two frontend plugins based on Widgets and QML. Both suffer the same issue. With widgets the mem consumption is even worse.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SamiV123
      wrote on last edited by SamiV123
      #2

      And how do you measure the memory usage?

      Keep in mind that if you're using a tool such as Windows task manager the memory usage is the working set size.

      Applications (running processes) have larger working sets since that includes memory regions that are shared between processes (such as the memory pages used for loaded DLLs ) than what is their "memory" usage that the programmer sees as object allocation etc.

      M 1 Reply Last reply
      0
      • S SamiV123

        And how do you measure the memory usage?

        Keep in mind that if you're using a tool such as Windows task manager the memory usage is the working set size.

        Applications (running processes) have larger working sets since that includes memory regions that are shared between processes (such as the memory pages used for loaded DLLs ) than what is their "memory" usage that the programmer sees as object allocation etc.

        M Offline
        M Offline
        manuelschneid3r
        wrote on last edited by
        #3

        @SamiV123 Yes i do use system monitors and htop. what else could I use? Working set or not, even if it is shared memory half a gig is way to much for such an application.
        My goal is to understand where the memory consumption stems from. If it stems from shared resources I may decide to avoid whatever I can. Serioulsy a launcher should not take as much ram as a full blown IDE.

        jsulmJ 1 Reply Last reply
        0
        • M manuelschneid3r

          @SamiV123 Yes i do use system monitors and htop. what else could I use? Working set or not, even if it is shared memory half a gig is way to much for such an application.
          My goal is to understand where the memory consumption stems from. If it stems from shared resources I may decide to avoid whatever I can. Serioulsy a launcher should not take as much ram as a full blown IDE.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @manuelschneid3r Use a proper memory analyzer like Valgrind

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

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