Open nitmir opened 9 years ago
Good idea! We may also integrate browser tab focus detection:
http://stackoverflow.com/questions/7389328/detect-if-browser-tab-has-focus
So query interval could have two values (with and without focus).
What about merging subsequent requests into a single batch request (twister-core supports this way)?
As long as twisterd runs locally the polling is not much of a problem i think (don't know for mobile). If you are using a remote server, like nitmir, through twister-proxy the lame repeated polling could be done by the proxy on behalf of the client through a mechanism called long polling as i proposed in https://github.com/digital-dreamer/twister-proxy/issues/5
+1 for long polling. that's something i'd like to have implemented right from the start of twister (lame polling is simply stupid) but i had to get going so i didn't take any time to investigate.
My instance of twister is on a remote server up 24/7 and I connect to it from a very slow connection. Actually, twister-html run a background RPC query before the last one return causing after a few minutes to completly sature my connection.
I would love to tell twister-html to only query in the backgourd every 10s or more, the best being to have an option to configure it.