[PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ulysses

    [PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt

    hi,

    I'm working in python 5 months. I think it's very cool language.
    I do a p2p python program GUI.
    First I make a software by wxpython. But I find wxpython use many many
    memory.
    Second I use PYQT. But memory use still big.
    But but but when I minimize the windows to taskbar, a fantasy
    something
    happened. memory use very very low when windows minimize.

    So I test it in wxPython. It's same as pyqt. Before I minimize windows
    to tray, and hide main windows. This way I just minimize to
    taskbar,don't
    hide to tray. memory use very low.

    I don't know how to program wxpython software can hide to tray and get
    lower memory use.although current computer's memory very big.

    Ulysses
  • Andrei

    #2
    Re: [PY GUI] interest function in python GUI(wxpython,py qt) program.wxpytho n, pyqt

    ulysses wrote:
    [color=blue]
    > I'm working in python 5 months. I think it's very cool language.
    > I do a p2p python program GUI.
    > First I make a software by wxpython. But I find wxpython use many many
    > memory.[/color]

    All GUIs tend to have a certain overhead. A fairly typical wxPy program
    will be (at startup) around 20 MB, but something really big like Boa
    gets to about 35 MB and something smallish can be around 15 MB. I don't
    find this unacceptable on reasonably modern systems. Other apps are
    roughly in the same range: Word, MSIE, Mozilla Thunderbird, Opera and
    Delphi are around 20 MB and people can keep those open at all times too.
    [color=blue]
    > Second I use PYQT. But memory use still big.
    > But but but when I minimize the windows to taskbar, a fantasy
    > something
    > happened. memory use very very low when windows minimize.
    > So I test it in wxPython. It's same as pyqt. Before I minimize windows
    > to tray, and hide main windows. This way I just minimize to
    > taskbar,don't
    > hide to tray. memory use very low.[/color]

    Happens with all apps on Windows: if you minimize them, the memory use
    in the task manager drops.
    [color=blue]
    > I don't know how to program wxpython software can hide to tray and get
    > lower memory use.although current computer's memory very big.[/color]

    You should look into wxTaskBarIcon. wxPy questions are probably best
    asked on the wxPython list.

    --
    Yours,

    Andrei

    =====
    Mail address in header catches spam. Real contact info (decode with rot13):
    cebwrpg5@bcrenz nvy.pbz. Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V
    ernq gur yvfg, fb gurer'f ab arrq gb PP.



    Comment

    • Werner Schiendl

      #3
      Re: [PY GUI] interest function in python GUI(wxpython,py qt) program.wxpytho n,pyqt

      Hi,

      you cannot reduce the memory consumption of a program by minimizing it
      to the taskbar (at least not in general).

      When you are interested in the memory usage of your program, don't get
      fooled by the Windows Task Manager. The column "Mem Usage" displays the
      current amount of *physical* memory used by each thread. It drops
      because Windows does swap out memory pages of background applications
      (i. e. minimized) more aggressively than for the foreground application
      (this among other optimizations is known as "foreground application
      boost" and can even be configured).

      To get an idea of how many memory your application really uses
      (including currently swapped out pages) see the column "VM Size". "Peak
      Mem Usage" is also sometimes interesting to monitor.

      These one will not change when you minimize your application to the tray
      or taskbar.

      You can select the columns from the Menu "View->Select Columns..." in
      the menu (it is only available when you are at the "Processes" tab).


      If you need something *really* small in terms of memory footprint, you'd
      better of having the GUI as a separate application that you only start
      when you need it and which then communicates with the service running
      invisible (or in a "DOS" window).

      However, I think the figures you mention need not really concern you if
      you want your application be run on current PC hardware.

      hth
      Werner



      ulysses wrote:
      [color=blue]
      > hi,
      >
      > I'm working in python 5 months. I think it's very cool language.
      > I do a p2p python program GUI.
      > First I make a software by wxpython. But I find wxpython use many many
      > memory.
      > Second I use PYQT. But memory use still big.
      > But but but when I minimize the windows to taskbar, a fantasy
      > something
      > happened. memory use very very low when windows minimize.
      >
      > So I test it in wxPython. It's same as pyqt. Before I minimize windows
      > to tray, and hide main windows. This way I just minimize to
      > taskbar,don't
      > hide to tray. memory use very low.
      >
      > I don't know how to program wxpython software can hide to tray and get
      > lower memory use.although current computer's memory very big.
      >
      > Ulysses[/color]

      Comment

      • ulysses

        #4
        Re: [PY GUI] interest function in python GUI(wxpython,py qt) program.wxpytho n,pyqt

        hi, Mr.Werner Schiendl

        You are right. When I start my program ,it's use 10MB memory. then
        I minimize it to taskbar, memory use is 3MB. But I notice total memory
        usage did't reduce anymore. I shutdown my program I notice the total
        memory really reduce.

        OMG. I fooled by windows task manager. You are really smart guy.
        I'm a windows programmer before (delphi,vb,vfp MIS).
        I never know it . How can I find more information for windows memeroy .
        which book your recommended.tha nks.

        Ulysses



        Werner Schiendl <n17999950.temp .werner@neverbo x.com> wrote in message news:<3f9519e9$ 1@brateggebdc5. br-automation.co.a t>...[color=blue]
        > Hi,
        >
        > you cannot reduce the memory consumption of a program by minimizing it
        > to the taskbar (at least not in general).
        >
        > When you are interested in the memory usage of your program, don't get
        > fooled by the Windows Task Manager. The column "Mem Usage" displays the
        > current amount of *physical* memory used by each thread. It drops
        > because Windows does swap out memory pages of background applications
        > (i. e. minimized) more aggressively than for the foreground application
        > (this among other optimizations is known as "foreground application
        > boost" and can even be configured).
        >
        > To get an idea of how many memory your application really uses
        > (including currently swapped out pages) see the column "VM Size". "Peak
        > Mem Usage" is also sometimes interesting to monitor.
        >
        > These one will not change when you minimize your application to the tray
        > or taskbar.
        >
        > You can select the columns from the Menu "View->Select Columns..." in
        > the menu (it is only available when you are at the "Processes" tab).
        >
        >
        > If you need something *really* small in terms of memory footprint, you'd
        > better of having the GUI as a separate application that you only start
        > when you need it and which then communicates with the service running
        > invisible (or in a "DOS" window).
        >
        > However, I think the figures you mention need not really concern you if
        > you want your application be run on current PC hardware.
        >
        > hth
        > Werner
        >
        >
        >
        > ulysses wrote:
        >[color=green]
        > > hi,
        > >
        > > I'm working in python 5 months. I think it's very cool language.
        > > I do a p2p python program GUI.
        > > First I make a software by wxpython. But I find wxpython use many many
        > > memory.
        > > Second I use PYQT. But memory use still big.
        > > But but but when I minimize the windows to taskbar, a fantasy
        > > something
        > > happened. memory use very very low when windows minimize.
        > >
        > > So I test it in wxPython. It's same as pyqt. Before I minimize windows
        > > to tray, and hide main windows. This way I just minimize to
        > > taskbar,don't
        > > hide to tray. memory use very low.
        > >
        > > I don't know how to program wxpython software can hide to tray and get
        > > lower memory use.although current computer's memory very big.
        > >
        > > Ulysses[/color][/color]

        Comment

        • Werner Schiendl

          #5
          Re: [PY GUI] interest function in python GUI(wxpython,py qt) program.wxpytho n,pyqt

          Hi

          ulysses wrote:
          -- snip --
          [color=blue]
          > OMG. I fooled by windows task manager. You are really smart guy.
          > I'm a windows programmer before (delphi,vb,vfp MIS).
          > I never know it . How can I find more information for windows memeroy .
          > which book your recommended.tha nks.
          >
          > Ulysses
          >[/color]

          Unfortunately I have no good book recommendations handy :-(

          I'd recommend you try this question on a Win32 specific group.


          regards

          Werner

          Comment

          Working...