[PD] GUI speed

Mathieu Bouchard matju at artengine.ca
Tue Oct 5 16:19:31 CEST 2010

On Tue, 5 Oct 2010, Hans-Christoph Steiner wrote:

> Matju, its really not helpful to anyone for you to keep talking like 
> this.

Hans, it's really not helpful to anyone for you to keep talking like this.

> So I guess I spent of month or more of coding to do nothing, according 
> to you,

That's not according to me. I didn't say that. What kind of words are you 
putting in my mouth ?

> because somehow it doesn't meet your definition of rewrite.

I did not come up with that definition. Talking using your definition of 
'GUI' and of 'rewrite' makes people believe that you did something that 
would take 3 or 5 times more time than you really did... Perhaps even 

> Everything related to the GUI was not rewritten.  The whole body of the 
> Tcl code that's not embedded in the C code was rewritten.
> Much code was taken from the old Tcl code and refactored into the new 
> (mostly iemgui stuff).

Can you say that the whole body of Tcl code was not rewritten because you 
took much code nearly as-is from the old Tcl code, such as several of the 
dialog_*.tcl files ?

> The next phase is rewriting the pd --> pd-gui message API so that pd 
> sends Pd messages to the GUI and not Tcl code.

That's interesting, but in itself, it won't solve anything, as you can 
achieve the same by sending much smaller Tcl code. Note that parsing Pd 
messages takes time, but it takes especially more time if you try to do it 
correctly instead of running a dumb [split $code].

> From what I have seen, the big problem is that pd currently generates 
> massive amounts of Tcl code when drawing things like array boxes.  This 
> needs to be sent over the network, parsed, compiled, and then run. 
> That's a lot of overhead IMHO.  The pd --> pd-gui messages should not 
> require new code to be parsed/compiled/run.  To me, once I found this 
> out, I was impressed at how fast the Tcl interpreter seems to be.

But did you get figures that support the idea that the generated code is a 
slowdown and that it's more of a slowdown than what you plan to do ?

| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC

More information about the Pd-list mailing list