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

web/dashboard: optimize task list auto-refresh #384

Closed
buchanae opened this issue Dec 8, 2017 · 1 comment
Closed

web/dashboard: optimize task list auto-refresh #384

buchanae opened this issue Dec 8, 2017 · 1 comment

Comments

@buchanae
Copy link
Contributor

buchanae commented Dec 8, 2017

The auto refresh on the task list is a excessive. Looks like it refreshes every 2 seconds, and in my dashboard that's download over 500KB per request.

I do like the idea of having the dashboard update without needing to hit refresh, but there's a lot of room for optimization here:

  • increase the interval to at least 10 seconds
  • use the page visibility API to only update when the tab is active (i.e. don't bother refreshing when the user isn't looking)
  • refresh tasks individually, and cache tasks in a final state
  • expose a task events API via HTTP and subscribe to that, pushing polling/streaming down a layer in the stack
  • after the initial load, only state changes, so refreshes can use the minimal task view

https://github.com/ohsu-comp-bio/funnel/blob/master/webdash/app.js#L51

screen shot 2017-12-08 at 9 59 00 am

@buchanae buchanae changed the title web/dashboard: reconsider auto-refresh on task list web/dashboard: optimize task list auto-refresh Dec 8, 2017
@buchanae
Copy link
Contributor Author

buchanae commented Jun 6, 2018

The main ideas left here are:

  • allow GetTask and ListTasks to request a specific subset of fields in the response to enable the client to get exactly what it wants without extra weight
  • provide an event system which client can easily subscribe to
  • server side rendering of initial page load
  • configurable and pause-able refresh in the dashboard

I'm not sure any of those are worth the amount of work and complexity. The initial problem was improved a lot.

The configurable and pause-able refresh loop is a good idea, but let's address that in a separate issue later.

@buchanae buchanae closed this as completed Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant