CPU, DSP Status vs Activity Monitor

    Feb 04 2011 | 4:29 pm
    Firstly, Shark has been really useful for tracking down what objects are using CPU. My problem now is figuring out why there is such a difference in CPU when comparing the DSP Status window to Activity Monitor.
    Here are the idle readings (polys~ muted etc)
    DSP Status - 5-6%
    Activity Monitor - 35%

    • Feb 04 2011 | 5:08 pm
      Ah OK, so now it's how to reduce the non DSP processing!
      There are a few threads on that I think (getting rid of number boxes/ unnecessary objects) Are there any objects I should specifically look out for?
    • Feb 04 2011 | 6:04 pm
      Thanks Vanille,
      Is it safe to assume that the CPU with the audio turned off are the non audio processes?
    • Feb 04 2011 | 7:06 pm
      Attached is the readout from Shark with the audio off when the patch is first loaded.
      Max/MSP on its own with audio off in Activity Monitor takes about 6% CPU,
      The CPU in Activity Monitor with the patch loaded and audio off is roughly 26%
      The readout from Shark shows Max at roughly 12% with audio off, leaving 8% somewhere else?!
      Is the CPU reduction more of a question of trial and error, or can anyone make sense of the Shark data? Or perhaps both?
      Thanks again
    • Feb 05 2011 | 11:43 pm
      Shark might be useful to find the objects which really takes continuous usage of CPU, such as DSP objects.
    • Feb 06 2011 | 1:48 pm
      Hi Emmanuel,
      Yes, I've used Shark to tweak the DSP objects, it is indeed great for that. My problem now is making sense of that data, or more likely finding the objects that are causing this idle CPU %
      @ Vanille, I think trial and error is indeed the way forward, thanks again
    • Feb 06 2011 | 2:24 pm
      You can't go further than what you did. Basically now you see that you have a bunch of things that are redrawing, and that's taking more CPU than the actual calculation of the patcher. I wouldn't worry too much about the idle processing, although this has been widely improved in Max 5 compared to Max 4, Max will always take some CPU while doing "nothing", the scheduler has to be maintained ready, among other things.
    • Feb 06 2011 | 3:01 pm
      I can always use fewer objects (I have already got rid of quite a few, and can get rid of more) What is redrawing? Is it related to graphics?
      RE the idle processing, I'm not concerned about Max itself, obviously I can't do anything about that. But I presume that less objects = less CPU, so at least I can try and optimise the 'Max' side of the patch?
    • Feb 06 2011 | 6:18 pm
      - don't lose your time to gain 1 % !
      @vanille, That's the key point! Don't optimize unless you need to. (I'm less optimistic on the sprintf comment though ;-)
    • Feb 06 2011 | 6:43 pm
      Thanks again guys. The reason I'm conscious of CPU is that I am going to sell the application commercially.
    • Feb 06 2011 | 10:01 pm
      oh yeah sorry I misread your post. sprintf is definitely slower, and that's not his job anyhow ;-)