LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Initialization of shared network variables is very slow

Hi there!

I'm writing a simple application to read/write shared network variables in C++. To do so I use the function CNVCreateWriter to create a writer for each variable I want to use:

 

CNVCreateWriter(mName, nullptr, nullptr, CNVWaitForever, 0, &mWriter);

I have noticed that this call takes very long (roughly 70ms). So for 1000 variables my application takes more than a minute to start. After that reading and writing works very fast.

 

Is this normal behavior? Is there anything I can do to speed things up?

 

PS:

I already tried to replace CNVWaitForever with a very short time interval (e.g. 1). This indeed makes the call a lot faster. But then the next call (e.g. CNVCreateSubscriber) takes much longer. So in the end nothing is won.

0 Kudos
Message 1 of 2
(2,379 Views)

i have done one application with this variable and had the same problem.

to avoid waiting i've done the connection in a separate thread but it's only a workaround

Davide Vittorio G. - TLGB S.R.L.
Italian SW Developer
Message 2 of 2
(2,302 Views)