[PD] removing objects causes recomposing of the dsp graph

Mathieu Bouchard matju at artengine.ca
Fri Apr 9 21:08:50 CEST 2010

On Fri, 9 Apr 2010, Roman Haefeli wrote:

> Yeah, suppressing works as long as DSP is turned off. However, when I
> turn it on again after having deleted some objects, the dsp graph will
> be redrawn. Is there a way suppress that last single redraw as well? I
> don't get why it does redraw always on deletion but only sometimes on
> creation.

Well, the graph ought to be recompiled always on deletion like it ought to 
be recompiled always on creation. However, for creation, if you skip 
recompilation, all you get is that the new objects have dsp off while the 
old objects have dsp on. Whereas for deletion, if you skip recompilation, 
then there are deleted objects that have dsp on, and that causes a crash 
because pd tries to use a dead object.

To get out of this, you'd need a dsp compiler that could setup the output 
of the compilation so that it becomes modifiable at runtime, or so that it 
is broken down into pieces that are not too big, in both cases to make 
recompilation take less time.

In any case, if anything like that takes as much as 100 ms, perhaps there 
are some dsp-methods involved that do too much stuff during the 
compilation phase.

How many dsp-objects do you have at once, in your patch ?

Then, I also know of a problem in the dsp_add command, that causes it to 
display O(n^2) behaviour sometimes, but only sometimes. It's really 
abusing resizebytes() (that is, realloc()).

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801

More information about the Pd-list mailing list