Hallo, Phil Stone hat gesagt: // Phil Stone wrote:
Frank Barknecht wrote:
A fix for this maketime would be to reuse the symbols ":00" ... ":59" for minutes and hours by using two [cnv] objects for these. Then you would be able to let the clock run for decades before you get into trouble with the symbol table.
I've pondered this, and can't figure out what you mean, unless you're
suggesting having 60 canvases, one for each possible number?
No, only two canvases, one for minutes, one for seconds. See attachment. This way you only ever generate 60 different symbols. As existing symbols are reused, your memory usage doesn't grow after that.
Just to see the magnitude of the issue, I made a little test patch
(attached) called [symbol_pig]. It just creates symbols, very fast. A
very rough measurement based on watching resident memory increasing in
bash's top command indicates that (on OS X 10.4), a megabyte is used up
for approximately every 32,000 symbols.
So you can generate 128 million different symbols with a 4 GB RAM machine. :)
Personally I'd do heavy text processing in something like pdlua. Pd feels awkward when processing text.
Frank Barknecht Do You RjDj.me? _ ______footils.org__