[PD] Re: reduce CPU usage

tigital tigital at mac.com
Sun Jun 22 21:55:13 CEST 2003

On Sunday, June 22, 2003, at 07:19  AM, Shintaro Miyazaki wrote:

> hi
> how can I reduce CPU usage generally?
> I made a patch that uses almost 90% CPU and everything gets really 
> slow. (graphically)
> It uses 82% CPU also if its "stands still" and does nothing.
> I m working on a Apple G4 1 Ghz, 1GB RAM etc.
> I would be glad if somebody would help me with my patch so it gets 
> "faster".
> download it at . www.gezetera.ch/noise/supercpu.pd
> thank you in advance.

hello miyazaki,

...very nice looking patch, but that is the problem 
(unfortunately)...all that use of color is pretty, but horribly 
un-optimized, at least on the mac tcl/tk side...this is an incredible 
limitation to the usage of pd in any but an "experimental" manner...I 
have been working on moving tcl/tk's graphics to native coregraphics 
calls, but it is a big project, and I'm not convinced that it wouldn't 
be better to rewrite the pd gui in something else...but it's also 
apparent that the problem is not just the OSX tcl/tk, because I also 
get about 56% pd cpu usage with the patch sitting idle, and tcl/tk is 
barely 5-10%...it's disappointing that pd spends so much time with 
inefficient drawing calls...

...I would be interested in finding out how this performs on a linux 

...lastly, It would be very helpful if, when posting patches like this, 
you mention what libraries you are loading:  I have zexy, but don't 
know where most of the other stuff comes from!


More information about the Pd-list mailing list