MATLAB: How to speed up FOPEN in the Instrument Control Toolbox 2.3 (R14SP3)

Instrument Control Toolbox

When I execute the following code using the Instrument Control Toolbox 2.1 (R14SP1), the time taken is 3 milliseconds.
t = tcpip('144.212.206.51',7002);
set(t, 'TransferDelay', 'off');
t0 = clock;
fopen(t);
t1 = clock;
etime(t1,t0)
But if I execute the same code using the Instrument Control Toolbox 2.3 (R14SP3) it takes 4.5 seconds.

Best Answer

There has been a noticeable variation in the time it takes to open java TCP
connections based on the JVM version, the user's machine, and/or some
combination of both.
To work around this issue, preemptively open the TCPIP object if possible, and keep the connection alive so that you are not repeatedly creating and/or opening objects. This is good practice in general when using the Instrument Control Toolbox objects.