...
Simple Performance Test
In the IMC test modules/Apps for IMC a few stopwatches are included to be able to time Command and DataReady calls. The result is written directly in the module/App output window.
Its implemented both in the .Net 6 sample IMC modules/apps and in the Noah 4 IMC2 sample modules.
...
In the REST implementation the following happens slows performance in Command and DataReady calls.
The module makes an object (e.g. IMC command object) with data and sends a Command.
The REST API first serialize the data object (the module process) when it leaves the module and then de-serializes it back to an object in the proxy itself. (The proxy process)
Then the data object is sent through a direct connection form one proxy (IMCClient) instance to another (IMCServer) like previous IMC connection in Noah 4. This happens at once.
Then the Proxy sends an event to the IMCServer module again first serializing and de-serializing data.
Now the module (IMCServer) holds the original data as it was send from the client.
Now meanwhile the proxy waits for the module (IMCServer) to post the result of the data. (The proxy first check at 2 ms and then every 10 ms for the result)
Now the module post the command result which has to be serialized and de-serialized in the proxy.
...
Serializing and Desalinizing which happens two times between two .Net 6 modules (HTTP line in the diagram)
Converting Command and DataReady calls to events to receiver from the IMC Client/Server-Proxy.
For Command calls there is an extra time consuming factor due to the fact that a result must be returned.
When the IMCServer receives a Command event then it has to make a call back to IMC Client/Server-Proxy. The proxy is waiting for this call before the Command call can return.
For DataReady its much more simple and faster since there is no return value.
...