[PD] Troubleshooting help CPU Overload

IOhannes m zmoelnig zmoelnig at iem.at
Fri Jun 13 13:50:07 CEST 2008

Luigi Rensinghoff wrote:
> Hi List...
> I have a patch that drives the cpu-load up
> Wha do you think is the most common source for that ?? 

streams of messages (i often find that people just send tons of 
statechanges triggering all kind of superfluous calculations, while they 
really are just interested in the "settled" state)
naive search implementations, denormals, memory allocation,...

> How should i pin down the malicious circuit/external or whatevr it is..

try to find out when problems occur (do you have constant load? spikes? 
is the CPU load growing while the patch is running?) what does this tell 
you regarding your program logic?
try to disable parts of the patch (by deleting it). does the problem go 
away? try to narrow down the culprit.
use [print] for debugging rather than the numberbox (nbx will not tell 
you if a number changes 10000 times per tick)

use a profiler (e.g. valgrind, shark,...)

> It seems not to be related to Audio-Processing

even with audio turned off, [vline~] has a known bug (fixed by claude, 
but i don't know whether this has already made it into Pd) that would 
start eating CPU if you keep sending it messages.
there might be other objects that have similar problems (that is 
audio-objects that start eating CPU without dsp-on)


More information about the Pd-list mailing list