I have couple of flows that has around 300 mqtt nodes and all are using one single MQTT client.
Now, 40 MQTT nodes will go to one function node, 40 to other function node 60 to other function node 60 to other function node 20 to other function node 30 to other function node 50 to individual functions
So basically there is kind of grouping of nodes and will be calling one function to handle the data I get from topic.
I don't how Internally the function is called. Here is my assumption:
When I receive a message for particular topic mqtt node will get it wires array and call those functions. If there are like 300 MQTT nodes it will have an array of 300 nodes information and then will find the MQTT node for which data is received using BRACKET NOTATION of java-script. or it could be simply using if else conditions.
I read few posts saying that java-script will not always store objects in the form of hash tables. So there could be a performance hit because of dynamic key lookup by java-script.
Suppose, considering V8 java-script engine used by node js too. I should be storing data as hidden classes. But this will happen only when there is no change in structure of objects. If suppose topics are of different data types then that could result is multiple class or it will just store them as dictionary. So, In this case to there will performance hit.
Or if using eval to get the information of the node then also eval will have performance hit.
So, are my assumptions correct or Is the processing done differently which will not effect any performance?