<div dir="ltr"><div>Yes, all these timer loops in paraview are annoying. There is no platform independent solution for registering callbacks on sockets, but for each supported OS a clean solution exists, which you could implement. So, it is doable, but requires more effort than what is usually put into paraview. Additionally you wouldn't probably want a callback after each received byte, but rather after each complete message. This is not possible in a generic way with the present message construction.<br><br></div>You seem to be stuck with similar problems as I was. You may want to consider Visit as an alternative. Visit has an active user and developer community so that there are more than two people on the mailing lists who can answer questions like yours. Most of Visit has evolved over the last few years rather than the "don't touch if not necessary" long history of paraview, so that it has a much more modern design. These are some of the reasons why my supervisor convinced me to favour Visit even after I was half way through my project.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-10 18:58 GMT+02:00 Peter Debuchev <span dir="ltr"><<a href="mailto:peterdebuchev@gmail.com" target="_blank">peterdebuchev@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Ok, that doesn't sound as bad as I expected. But still, is it necessary to "poll" the socket, checking its "select" method?<br></div>I am not familiar with the details of socket communication, but I expect it should be possible that the socket invokes some callback when a message arrives? Or does some of the VTK design contradict such socket callbacks?<br><br></div>I found that it is always problematic performance-wise if more than a few timers are running on one cpu.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Peter<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-06-10 15:17 GMT+02:00 Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ProcessEvents() doesn't poll the server. It only "select"s on the<br>
socket to see if the server sent any new messages to the client.<br>
<div><div><br>
> One more question out of curiosity: isn't it quite ineffient, if clients<br>
> continuously invoke vtkNetworkAccessManager::ProcessEvents´()? For smooth<br>
> interaction this has to happen at least 10 times per second, which causes a<br>
> lot of network traffic by polling the server again and again,  especially if<br>
> more than one client connects to the same server.<br>
> Isn't it possible to react on incoming server events by registering a<br>
> callback that does the same server event processing only when a new event<br>
> has occurred? I mean, all of VTK and ParaView is event based, why not the<br>
> server message processing?<br>
><br>
> Peter<br>
><br>
> 2016-06-09 18:29 GMT+02:00 Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>>:<br>
>><br>
>> Here's the fix:<br>
>><br>
>> diff --git a/main.cxx b/main.cxx<br>
>> index dd47991..0f679ba 100644<br>
>> --- a/main.cxx<br>
>> +++ b/main.cxx<br>
>> @@ -65,7 +65,7 @@ int main(int argc, char* argv[]){<br>
>>    vtkSMSessionProxyManager* pxm = session->GetSessionProxyManager();<br>
>><br>
>>    //Collaboration:<br>
>> -  vtkSMCollaborationManager<br>
>> *collaboration=vtkSMCollaborationManager::New();<br>
>> +  vtkSMCollaborationManager *collaboration=<br>
>> session->GetCollaborationManager();<br>
>>    collaboration->SetSession(session);<br>
>>    collaboration->UpdateUserInformations();<br>
><br>
><br>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>