[PD] RE: [PD-dev] tcl/tk 8.5, antialising, and large fonts lead to huge cpu overhead bug?

Ivica Ico Bukvic ico.bukvic at gmail.com
Tue Feb 20 14:49:01 CET 2007


You are absolutely right from a pragmatic perspective. However, having 100
refreshes top off a relatively recent CPU is quite worrisome and IMHO should
not be dismissed lightly as it could manifest in other contexts as well.
FWIW I did a program which had a similar feature in Qt over four years ago
(with 100Hz refreshes for several concurrent timers) and its CPU usage was
always less than 3% at that time. This either suggests that Tcl/Tk is a
total hog or that there is a bug in a code somewhere (or both).

Hence me bringing this up...

Ico

> -----Original Message-----
> From: Hans-Christoph Steiner [mailto:hans at eds.org]
> Sent: Monday, February 19, 2007 10:22 PM
> To: ico at vt.edu
> Cc: pd-dev at iem.at
> Subject: Re: [PD-dev] tcl/tk 8.5, antialising, and large fonts lead to
> huge cpu overhead bug?
> 
> 
> Sounds like you are charting new territory.  I haven't worked with
> Tcl/Tk 8.5 yet, but I think a couple people on the list have.
> 
> I don't know of any reason to update a GUI object more than 100 Hz
> since that's about the max for screen refreshes.  10 Hz is probably
> faster than we can perceive numbers anyway.
> 
> .hc
> 
> On Feb 18, 2007, at 11:03 PM, ico at vt.edu wrote:
> 
> > All right, unlike my previous e-mail this is perhaps not a bug, but
> > an oddity.
> > Nonetheless, it would be nice to know at least where it is stemming
> > from so
> > that I can contribute code in the right place...
> >
> > I've encountered unusual spike in cpu use when using antialiased
> > tcl/tk 8.5
> > (IIRC it also affects other antialiasing-enabled tcl/tk releases) in
> > conjunction with large fonts. I for instance use this for my
> > performers so that
> > they can clearly read info even when positioned at some distance
> > from the
> > display monitor/LCD.
> >
> > One quick example would be to use a large font counter which counts
> > 1/100ths of
> > a second using metro and displaying it in a number2 object. This
> > results in a
> > 80+% (!) CPU utilization on an Athlon 64 3000+. Lowering metro to
> > 1/10th of
> > second drops CPU use below 5%. Similarly making font smaller does
> > the same.
> > Font size used is in this case is just about anything above 72.
> >
> > Any ideas how to circumvent this problem? Is this due to antialiasing
> > inefficiency in tcl/tk or some other reason? If I can be pointed in
> > the right
> > direction, I'll gladly provide patches...
> >
> > Best wishes,
> >
> > Ivica Ico Bukvic, D.M.A.
> > Composition, Music Technology, CCTAD, CHCI
> > Virginia Tech
> > Department of Music
> > Blacksburg, VA 24061-240
> > (540) 231-1137
> > (540) 231-5034 (fax)
> > ico.bukvic.net
> >
> > _______________________________________________
> > PD-dev mailing list
> > PD-dev at iem.at
> > http://lists.puredata.info/listinfo/pd-dev
> 
> 
> 
> ------------------------------------------------------------------------
> 
> If you are not part of the solution, you are part of the problem.






More information about the Pd-list mailing list