Forums > Dev

t_symbol simple question

Sep 25 2013 | 4:25 pm

I want to make communicate maxmsp to another proprietary software via tcp protocol.
I want to make the protocol as fast as possible between the two like there will be a large quantity of datas and different targeted objects datas sent between the two softwares.

The system will include a management of objects present in max and in the other software, so that max patch will only have to send some message (name of the target object + name of the class + + type of datas + list…).

To optimize the network protocol, i want to convert symbols living in max patches messages (or autopattrs) into value pointers : convert the strings into a unique id int16 or int32 know from the two softwares).

To allow a huge quantity of different pointers (thousands or possibly millions), i would want to avoid a string comparison methods inside my max object.

Is it possible in maxsdk to "scan" a patch, find the messages box attached to my c external, and only compare, i believe, t_symbols pointers to quickly find the id of the message?
Same question asked easier :
Do a message box contain a t_symbol pointer?

If yes, i can compare a "t_symbol" table, it could really lower my cpu usage…

If anyone can only say me where to look for in the sdk doc, it would me nice.

thank you !

Sep 26 2013 | 4:26 am

thank you very much for this informations.

Anyway have you "measured" efficiency bottlenecks or is it just assumptions ? Take care about premature optimization, and take care to understand well the t_symbol pool mechanisms before going that far in convoluted designs.

yes you’re right, i know the danger about premature optimization, but i just thought that,
in my targeted softwares, i use to create manually at least ten or hundred thousand of objects, so i am looking for an efficient way to point as fast as possible to the objects via network without comparing each object’s name one by one by strcomparison method.
Comparing into a int[] pointer is much faster than comparing possibly large string[].

Sep 26 2013 | 6:29 am

nice thx a lot, i look at this and will post later if everything goes good.

Sep 26 2013 | 6:53 am

I am coding an efficient UnityMax communication (and other game engines…protocol) like osc is quite slow, and not really designed in a tcp mind.
Unity can instantiate a huge quantity of objects (you can do it by hand easily too), and the existing "mu" plugin is not well designed (i mean for optimization) in the unity c# part.
In game engines, you manage objects mainly by their name like in 3d editors, typed by hand, or script generated.

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > Dev