Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Refresh while not in focus #1878

Closed
Tracked by #166211
draco2003 opened this issue Nov 11, 2014 · 20 comments · Fixed by #177693
Closed
Tracked by #166211

Disable Refresh while not in focus #1878

draco2003 opened this issue Nov 11, 2014 · 20 comments · Fixed by #177693
Assignees
Labels
enhancement New value added to drive a business result Feature:Dashboard Dashboard related features Feature:Unified search Unified search related tasks impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:large Large Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@draco2003
Copy link

As the number of users that have one or more kibana tabs running in the background increases the load on the ES cluster increases as well with no real benefit.

If would be great to have the option to disable refreshing of data when the browser tab is not in focus.

https://developer.mozilla.org/en-US/docs/Web/Guide/User_experience/Using_the_Page_Visibility_API

@rashidkpc
Copy link
Contributor

Auto refresh is not currently supported in kibana 4, feel free to add comments to this ticket so we keep them in mind when we implement it: #1845

@srijan55
Copy link

SInce #1845 is now closed. Adding +1 to this request.

@LucaWintergerst
Copy link
Contributor

Any chance that we can consider this for 6.x as we have auto refresh back in Kibana 5.x?

@nreese nreese self-assigned this Jun 2, 2018
@stacey-gammon
Copy link
Contributor

Related: #14750

@nreese nreese added PR sent and removed help wanted adoptme labels Jun 28, 2018
@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed :Sharing labels Sep 14, 2018
@kcm
Copy link

kcm commented Jun 3, 2019

Have a few requests from customers to disable auto-refresh entirely, either Kibana-wide or per-Space. In their use case, analysts will sometimes not realize it's enabled, and leave an expensive query needlessly auto-refreshing even when in focus.

@timroes timroes added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Oct 7, 2020
@nreese nreese removed their assignment Jun 24, 2021
@ThomThomson ThomThomson added enhancement New value added to drive a business result impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. and removed PR sent release_note:enhancement labels Jan 26, 2023
@ThomThomson
Copy link
Contributor

Giving this one impact low, as the auto-refresh settings can be easily turned on and off on a per-dashboard basis.

@draco2003
Copy link
Author

While I don't disagree with the impact low, It is much more from the infrastructure/load perspective and less around the user perspective.
We want dashboards to refresh when individuals are observing them, but it's a waste of resources if they are refreshing in a background tab.

@thomasneirynck
Copy link
Contributor

thomasneirynck commented Jan 29, 2024

I would agree with @draco2003 here.

The problem is less on the consumption on the dashboard-end/single user experience, but the overall impact on the system.

e.g. Consider an org where each user has a dashboard open -> this would create continuous strain on Elasticsearch, degrading the experience for all users.

This sits on the edge of enhancement/bug imho.

This is also not solely a Dashboard issue. Any app using the unified search bar has this issue. But it is most pressing for Dashboard due to the large number of queries a single Dashboard can issue.

@thomasneirynck thomasneirynck added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Feature:Unified search Unified search related tasks Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Jan 30, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@ThomThomson ThomThomson added the loe:large Large Level of Effort label Jan 30, 2024
@ThomThomson
Copy link
Contributor

Adding large LOE to this because we'll need to take into account a setting to turn this capability off - it could get in the way of using Kibana as an unattended kiosk, and we'll also need to make sure that the page refreshes immediately on focus if the appropriate time has elapsed.

It's potentially between a medium and a large, so we could re-assess in the future if something changes.

@thomasneirynck
Copy link
Contributor

thomasneirynck commented Jan 30, 2024

a setting to turn this capability off

@ThomThomson would this not depend mostly on the particulars of the visibility-change event https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilitychange_event . e.g. a kiosk-mode window should still be visible, even when not in focus (?)

we'll also need to make sure that the page refreshes immediately on focus if the appropriate time has elapsed

++

@ThomThomson
Copy link
Contributor

In my cursory research, I was looking into focus - but it seems like the visibility change event you suggest is more likely the correct event to rely on. We'll need to do some more research to determine if that works correctly in a variety of setups - and depending on how confident we are, we could do away with the advanced setting.

@petrklapka petrklapka added the Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) label Feb 2, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@petrklapka
Copy link
Member

Adding this to SharedUX board. Tim asked if we could cover this. Hard to say right now, we're pretty booked fro the quarter already, but we'll keep it on the board and if we wrap something early, we can take a look.

@draco2003
Copy link
Author

FYI, with Chrome's memory saver disabling inactive tabs this is a lower priority for us now

@petrklapka
Copy link
Member

@ThomThomson - Just curious, why did this 10 year old issue become hot?

@ThomThomson
Copy link
Contributor

@petrklapka I believe there's been some interest from Product due to a recent client request. @thomasneirynck CC

@vadimkibana
Copy link
Contributor

I know of use cases where a dashboard is put on a large screen or a TV for 24/7 display of some data. I believe those users would want their data to be refreshed even if the page is not focused. Would we consider those use case? Maybe if dashboard is in a full screen mode, the blur of a tab would not stop refreshing? Or some more explicit mechanism?

@stratoula
Copy link
Contributor

This is a valid point @vadimkibana. Do we know how this https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilitychange_event will behave in these cases? Otherwise we might need a setting or something

@Dosant
Copy link
Contributor

Dosant commented Feb 23, 2024

Do we know how this https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilitychange_event will behave in these cases?

I think this should work for the 2nd screen use case and this is the way to implement this (as @ThomThomson and @thomasneirynck already mentioned above)

I can give it a shot and we can play with it.

What is good, is that a lot of places already rely on the timefiler service for autorefresh, so we only need to update one place and everybody who uses the timefilter service for autorefresh should get the improvement automatically

@Dosant Dosant self-assigned this Feb 23, 2024
Dosant added a commit that referenced this issue Mar 4, 2024
## Summary

close #1878

Pauses auto-refresh when a page is not visible. 
I tested and didn't notice any issues, but looking for more testing help


## Release Notes

Auto-refresh pauses when the page is not visible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Dashboard Dashboard related features Feature:Unified search Unified search related tasks impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:large Large Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet