Professional Web Applications Themes

high CPU usage in Activity Monitor - Mac Programming

I notice that my app uses a lot of CPU when I check with Activity Monitor. I'm not sure what to do to get this down. There are some timers, but they're not running when I check. When I close all windows the CPU usage goes down to near 0 but when some are open there is around 56% CPU usage, even in the background, when another app is being used instead. There is also a lot of context switching, about 10 times that of Photoshop.... How do I investigate this? What are common causes of this? There's nothing particularly ...

  1. #1

    Default high CPU usage in Activity Monitor

    I notice that my app uses a lot of CPU when I check with Activity Monitor.
    I'm not sure what to do to get this down. There are some timers, but they're
    not running when I check. When I close all windows the CPU usage goes down
    to near 0 but when some are open there is around 56% CPU usage, even in the
    background, when another app is being used instead. There is also a lot of
    context switching, about 10 times that of Photoshop....

    How do I investigate this? What are common causes of this? There's nothing
    particularly CPU intensive about my app.

    Thanks.

    MachO C app CW8 OSX 10.3

    brucecoughlin Guest

  2. #2

    Default Re: high CPU usage in Activity Monitor

    In article <BBC5F377.4459%rr.com>,
    brucecoughlin <rr.com> wrote:
     

    Try using Sampler (part of the developer tools) to see where your
    application is spending time, then rearchitect or optimize those parts
    of your code.

    -Eric

    --
    Eric Albert edu
    http://rescomp.stanford.edu/~ejalbert/
    Eric Guest

  3. #3

    Default Re: high CPU usage in Activity Monitor

    In article <stanford.edu>,
    Eric Albert <edu> wrote:
     

    JSYK: Sampler is folded into /Apps/Utils/Activity Monitor in Panther

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  4. #4

    Default Re: high CPU usage in Activity Monitor

    In article <mit.edu>,
    Miro Jurisic <org> wrote:
     
    >
    > JSYK: Sampler is folded into /Apps/Utils/Activity Monitor in Panther[/ref]

    Only sort of. Sampling functionality is in Activity Monitor, but
    Panther also includes an all-new Sampler application in the developer
    tools with a bunch of new features over the Jaguar version.

    (But thanks for the tip...I didn't know about the version of it in
    Activity Monitor.)

    -Eric

    --
    Eric Albert edu
    http://rescomp.stanford.edu/~ejalbert/
    Eric Guest

  5. #5

    Default Re: high CPU usage in Activity Monitor

    In article <stanford.edu>,
    Eric Albert <edu> wrote:
     
    > >
    > > JSYK: Sampler is folded into /Apps/Utils/Activity Monitor in Panther[/ref]
    >
    > Only sort of. Sampling functionality is in Activity Monitor, but
    > Panther also includes an all-new Sampler application in the developer
    > tools with a bunch of new features over the Jaguar version.
    >
    > (But thanks for the tip...I didn't know about the version of it in
    > Activity Monitor.)[/ref]

    But everybody should install CHUD and use Shark anyway. It does
    everything Sampler does, and much more. Line-by-line profiling of your
    app plus commentary on each pipeline stall or whatever that you're
    causing is cool! :)
    Michael Guest

  6. #6

    Default Re: high CPU usage in Activity Monitor

    In article <mail-D21AEA.19243230102003localhost>,
    Michael Ash <com> wrote:
     

    Yeah, but CHUD is a little... daunting at first. I still use Sampler to get a
    rough idea of what's going on.

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  7. #7

    Default Re: high CPU usage in Activity Monitor

    In article <mail-D21AEA.19243230102003localhost>,
    Michael Ash <com> wrote:
     
    > >
    > > Only sort of. Sampling functionality is in Activity Monitor, but
    > > Panther also includes an all-new Sampler application in the developer
    > > tools with a bunch of new features over the Jaguar version.
    > >
    > > (But thanks for the tip...I didn't know about the version of it in
    > > Activity Monitor.)[/ref]
    >
    > But everybody should install CHUD and use Shark anyway. It does
    > everything Sampler does, and much more. Line-by-line profiling of your
    > app plus commentary on each pipeline stall or whatever that you're
    > causing is cool! :)[/ref]

    CHUD is great for what it does. Sampler is great for what it does.
    Sometimes they overlap, but certainly not always. :)

    -Eric

    --
    Eric Albert edu
    http://rescomp.stanford.edu/~ejalbert/
    Eric Guest

Similar Threads

  1. High Processor Usage
    By AIRNORTH in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: January 8th, 04:43 PM
  2. Random High CPU usage
    By asounds in forum Coldfusion Server Administration
    Replies: 6
    Last Post: January 15th, 12:56 PM
  3. Mysterious lag on high memory usage
    By Bulkis in forum Coldfusion Server Administration
    Replies: 0
    Last Post: November 7th, 09:37 AM
  4. Replies: 4
    Last Post: July 3rd, 08:02 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139