hi all ...
there was the discussion about local symbol tables some time ago.
local symbol tables (symbol tables for each parent canvas) would have two advantages: - faster access to symbol pointers (gensym) - freeing unused symbols after closing the specific parent canvas
there would be an easy way to implement local symbol tables, when we don't take the second point into account: when deleting a parent canvas, we can be sure, that the $0 value of this specific canvas will not be valid any more (so no symbols starting with this specific $0 value will be created any more), unless: - someone stores this $0 values somewhere in his patch - we have an overflow of $0 values (not sure, if there is anything concerning this implemented at the moment ...)
so i'd propose this: - every parent canvas will have a local symbol table for symbols starting with $0 - when deleting a parent canvas, the symbols from the local symbol table will be moved to a data structure containing all cleaned symbols (so we won't need to garbage collect the symbols from pd/externals) - gensym would have to be adapted to allow three kinds of behaviours: - normal symbol handling, using the global hash table - active $0 handling, adding the symbol to the specific local hash table - obsolete $0 handling, adding symbol to the data structure containing cleaned symbols
i consider this more elegant than the current 11bit hash table ... but i'd like to hear some thoughs about this proposal ...
cheers .... tim