Open ogrisel opened 6 years ago
Expanding the rectangles on the screen would require Bokeh patch events, which is doable but would be somewhat expensive because we would be updating the data structure at every tick event at random locations within the ColumnDataSource. I haven't done any benchmarking here, but I would not be surprised to learn that this was somewhat expensive. I'm not opposed to this idea, but I think that it should be accompanied by a performance analysis.
Alternatively, perhaps we could provide some other signal that a worker is actively computing, perhaps by adding a thin vertical plot just to the right of the task stream plot that included a thin rectangle the color of the task being computed. This reminds me a little bit of old Nintendo games like Tetris or Dr. Mario, where you could see the type of thing you were about to get so that you could anticipate it. Just a thought though.
My one concern here is that I don't think we have the thread ID (which determines the vertical location) until the task completes, so this would require an extra message from the worker to the scheduler (which is doable).
Maybe we could just change the background color of the lane of the worker when it's working.
A tiny fixed location "state" rectangle on the right-hand side of the lane of the worker would be better actually.
If we can constrain the max x axis value we could just make this a big rectangle with a time far in the future? In a similar vein in might be handy to be able to mark other task states with a visual indicator for things that are in memory. Easy enough to do when we switch rect to quad
I find it confusing that the tasks are a displayed on the status/tasks tabs as horizontal color rectangle only once they are complete. For instance, it can give the misleading impression that a worker is not doing anything while it is actually processing a task that lasts 10x the average time of tasks completed concurrently on other workers.
I think it would make things clearer to display the task rectangles as soon as the execution of the task starts on the worker and thereafter extend the righthand side of ongoing task rectangles whenever the dashboard is refreshed (e.g. every 200ms second or so). I am not sure if this can be done efficiently with bokeh or if it would require sending additional events from the workers to the scheduler. Ideally, the right-hand side border of rectangles for the ongoing tasks could be displayed differently (e.g. a transparent right-hand side border)
This is somewhat related to #1883 but different. I cross-link so that the person (maybe myself) tackling this keep the two issues in mind when fixing any of them.