03-08-2019 04:19 AM
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.
03-14-2019 04:40 AM
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