Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. While running my application , Machine (PC) gets slow

While running my application , Machine (PC) gets slow

Scheduled Pinned Locked Moved C / C++ / MFC
c++questioncode-review
12 Posts 4 Posters 2 Views 1 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.
  • Z zahid_ash

    HI, When I run my application ( Multi threaded application- MFC based Socket , with which I Recive the file from Client/Sender). The machine gets slow ( that as explorer response is slow some times) After getting few files. Why its the machine (PC) get slow. How can I check it , How can I improve my app that it do not effects the system. Thannks Regards.

    _ Offline
    _ Offline
    _AnsHUMAN_
    wrote on last edited by
    #2

    You can use perfmon utility that is shipped with windows this will atleast give you some idea. Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_

    Z 1 Reply Last reply
    0
    • _ _AnsHUMAN_

      You can use perfmon utility that is shipped with windows this will atleast give you some idea. Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_

      Z Offline
      Z Offline
      zahid_ash
      wrote on last edited by
      #3

      Could you please tell me Where this utility is. How I can open and use it ( its location /path) and some using hints Thanks Regards.

      _ 1 Reply Last reply
      0
      • Z zahid_ash

        HI, When I run my application ( Multi threaded application- MFC based Socket , with which I Recive the file from Client/Sender). The machine gets slow ( that as explorer response is slow some times) After getting few files. Why its the machine (PC) get slow. How can I check it , How can I improve my app that it do not effects the system. Thannks Regards.

        S Offline
        S Offline
        Stephen Hewitt
        wrote on last edited by
        #4

        Try _AnShUmAn_'s idea; you need to determine why it's getting slow. Is it consuming too much CPU time? Is it consuming too much memory? Even task manager can be a big help with this. Steve

        Z 1 Reply Last reply
        0
        • S Stephen Hewitt

          Try _AnShUmAn_'s idea; you need to determine why it's getting slow. Is it consuming too much CPU time? Is it consuming too much memory? Even task manager can be a big help with this. Steve

          Z Offline
          Z Offline
          zahid_ash
          wrote on last edited by
          #5

          OK, IF its CPU consuming hten how can handle it , otherwise if its memory using how can I handle it Regards.

          S 1 Reply Last reply
          0
          • Z zahid_ash

            OK, IF its CPU consuming hten how can handle it , otherwise if its memory using how can I handle it Regards.

            S Offline
            S Offline
            Stephen Hewitt
            wrote on last edited by
            #6

            None of these questions have a useful generic answer apart from the obvious. i.e. Use less CPU time/memory. First things first: identify the problem. Steve

            Z 1 Reply Last reply
            0
            • S Stephen Hewitt

              None of these questions have a useful generic answer apart from the obvious. i.e. Use less CPU time/memory. First things first: identify the problem. Steve

              Z Offline
              Z Offline
              zahid_ash
              wrote on last edited by
              #7

              HI, I have check CPU usage is 99% , while memory usage is 3500 K So how can I reduce CPU usage for my application so that other application aslo run smothly Regards.

              S B 2 Replies Last reply
              0
              • Z zahid_ash

                HI, I have check CPU usage is 99% , while memory usage is 3500 K So how can I reduce CPU usage for my application so that other application aslo run smothly Regards.

                S Offline
                S Offline
                Stephen Hewitt
                wrote on last edited by
                #8

                You need to find out which part of you code is consuming all the CPU time. You could try a profiler. There is also the "poor man's profiler": run the program in a debugger and break execution multiple times and see what the program is doing. Steve

                Z 1 Reply Last reply
                0
                • Z zahid_ash

                  Could you please tell me Where this utility is. How I can open and use it ( its location /path) and some using hints Thanks Regards.

                  _ Offline
                  _ Offline
                  _AnsHUMAN_
                  wrote on last edited by
                  #9

                  One way is to go to the Run option in the Start Menu and type perfmon. Another one is to go to the Administrative Tools in Start Menu>Settings>Control Panel>Administrative Tools>Performance Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_

                  1 Reply Last reply
                  0
                  • S Stephen Hewitt

                    You need to find out which part of you code is consuming all the CPU time. You could try a profiler. There is also the "poor man's profiler": run the program in a debugger and break execution multiple times and see what the program is doing. Steve

                    Z Offline
                    Z Offline
                    zahid_ash
                    wrote on last edited by
                    #10

                    Could you please send me a link to a free and good profiler download thanks Regards.

                    1 Reply Last reply
                    0
                    • Z zahid_ash

                      HI, I have check CPU usage is 99% , while memory usage is 3500 K So how can I reduce CPU usage for my application so that other application aslo run smothly Regards.

                      B Offline
                      B Offline
                      blue_rabbit
                      wrote on last edited by
                      #11

                      He, I think your code may have infinity loop. Like this: while(i < 100){ //forget increase i //i++; } Check the loops in your code.

                      S 1 Reply Last reply
                      0
                      • B blue_rabbit

                        He, I think your code may have infinity loop. Like this: while(i < 100){ //forget increase i //i++; } Check the loops in your code.

                        S Offline
                        S Offline
                        Stephen Hewitt
                        wrote on last edited by
                        #12

                        The "poor man's profiler" will find this one. Steve

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups