[PD] Tcl getting sluggish

Pierre Alexandre Tremblay tremblap at gmail.com
Wed Mar 20 21:00:09 CET 2024


Hello

So I am trying to optimise the drawing of fluid.plotter… I have a dictionary in TCL land, which I thought would be clever, but it seems to get worse as I replace points.

2 questions for the pros of the pd GUI coding:

1. Is it better to keep my database in C and pass it afresh at all draw call and forget about dictionaries on the tcl side?

2. If not, am I right to have noticed some struggle with dict on the tcl side?

The code in question is here:

https://github.com/flucoma/flucoma-pd/blob/main/src/fluid.plotter/fluid.plotter.c


The method is ‘addpoint’ - and if I enter the same points over and over again (like in the fluid.stat helpfile) it gets worse and worse and worse… and it is worse on Windows, then Mac, then less worse on Linux.

Any help welcome. I know the code is not ideal but I’m fighting on all fronts to try to keep a reactive GUI to plot and click many objects…

Thanks!




More information about the Pd-list mailing list