Lower refresh interval when app has focus


#1

Hi,

I tried to lower “Refresh interval for public board” option to some seconds, but sounds like the minimum enforced value is 10 seconds.
It’s still a little bit too high when for example we are several users working on the same board at the same time, through a conference call for example.

Would then be nice to be able to set a refresh interval when application has focus (i.e. when user is working on the board).
Having for example a 2 seconds refresh interval when focus is on would give impression of a real-time application.
Of course we don’t need such a low value when application does not have focus.

Thank you very much :+1:


#2

What’s it do when you set it below 10? Just curious.


#3

Option value “2” is accepted and saved, but boards are refreshed on a 10 seconds basis : when userA makes a modification, userB sees it at most 10 seconds later.


#4

K, for curiosity, I tested by changing to 2 seconds and 20 seconds, both changes worked just fine for me but did require a refresh of the browsers.


#5

You’re right @creecros, my mistake, I was playing with the public board refresh interval, instead of the private one…
Anyway, having a “on focus” interval would really be nice, as a 2 seconds interval is quite useless when application does not have the focus, and could uselessly load the webserver (in addition to the client browser).

Thank you :+1:


#6

my understanding may be wrong, but looking at the code, the refresh interval happens in the boardviewcontroller. Nothing is interacting with that controller unless someone is browsing to it…so technically, it is only while the app has “focus”

Edit: I meant BoardAjaxController, but i still believe that isn’t called unless there is interaction via a browser. I could be wrong.

Edit again: Unless by “focus” you mean, you have multiple browsers open including kanboard in board view…maybe that’s what you mean, and if that’s the case, my javascript is kind of rusty, but I still don’t think it will refresh unless it is visible.


#7

But focus, I initially meant user working on Kanboard board view.
But sometimes, user is for example chatting through another application, while looking at Kanboard board view in the background (or next to the chat app). And here, having Kanboard board view refreshed as if user was working on it may be a good thing.

I did some tests, and in both cases, board view is refresh on the private refresh interval.
Perfect.
And when the browser is minimized, or when Kanboard tab is not the active one, refresh is stopped.

So it’s already perfect…

I then think we can close this :slight_smile:

Thank you for your help @creecros :+1:


#8

@Mart124 No problem :+1: