Showing results for 
Search instead for 
Did you mean: 

how to speedup an application with mathscript nodes

I developed an application with mathscript nodes on both sides (server and client). The procedure is as follows:
1. The server calculates the result (use mathscript) and transfers the result to the client.
2. The client displays the result and sends the commands to the server.
3. After receiving the commands, the server does calculations again (use mathscript) and send the results to the client
4. The client does the calculations according to the results received and diplay.
For this kind of architecure, It is necessary to use  realtime FIFO for speedup? I used the variables to communicate but it is very slow since all the calculations are computational expensive.
Anyone has good suggestions? Thanks in advance.
0 Kudos
Message 1 of 2

So just to make sure that I have your application correct, you are communicating with two computers and using shared variables.  The server computer does calculations and then transfers that information to the client, who then sends additional commands to the server, who then does more computations, sends the result back to the client, which gets calculated one last time and displayed.  Is that correct? I would recommend two approaches for this.  I might suggest placing as much of the calculation in one place which might ease some of the complexity of the application.  If this is not possible, then I would recommend using some sort of queue and possibly a producer/consumer type application architecture.  There are several examples of this type of architecture in LabVIEW. 

I would also make sure that the variables are what is causing the communication slowdown.  If there is some computationaly intense parts of the code I would recommend using parallel loops to make sure that other LabVIEW processes can run as well. 

Andy F.
National Instruments
0 Kudos
Message 2 of 2