[PD] CPU saving strategies

Mathieu Bouchard matju at artengine.ca
Sun Aug 1 21:57:46 CEST 2010


On Sun, 1 Aug 2010, ypatios wrote:

> the arrays being visible alone should't cause excessive cpu consumption, 
> but if you built a mechanism that refreshes the content of those 
> (visible) arrays, then it could happen..

Also, much of that refresh may not be visible in the "Load Meter" patch 
and [cputime] in general, because much of the job is NOT done in the main 
thread (nor any other threads that may be associated with [cputime]).

> i haven't seen your patch, so i can not tell you more, but, generally, 
> using many GUI objects at a high refreshing rate, may cause tremendous 
> cpu consumption, since pd lacks the option for hardware acceleration for 
> graphics, as i recently learned from this list.

Using Linux as an example, Pd uses Tk, Tk uses X11, and X11 uses hardware 
acceleration. It may just not be the same kind of hardware acceleration 
that you have in mind. OpenGL is not the only interface to what can be 
considered to be hardware acceleration. (one can make a similar argument 
about other OSes as well).

I know that Tk redraws way too many things that it shouldn't have to 
redraw, but then GL usually makes even more useless redraws than that. The 
problem is probably about HOW MANY things are being covered by the 
hardware acceleration that is in use, vs how many are still computed by 
the CPU.

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


More information about the Pd-list mailing list