-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Hold streams together for faster plot callbacks #6247
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6247 +/- ##
==========================================
+ Coverage 88.39% 88.47% +0.08%
==========================================
Files 323 323
Lines 67620 67642 +22
==========================================
+ Hits 59770 59849 +79
+ Misses 7850 7793 -57 ☔ View full report in Codecov by Sentry. |
I tried this too, but I'm not sure why with self.plot.root.hold_render():
with set_curdoc(self.plot.document):
Stream.trigger(streams) |
The root is the Bokeh root on the Bokeh document and will change depending on whether you are rendering the plot on its own or inside some Panel component. |
I'd suggest using:
|
@ahuang11 Can you confirm whether this still gives the expected speedups? |
It seems so. This is b.mp4And this is a.mp4
|
Seems like it works in notebook (VSCode) c.mp4 |
That looks much slower than what we saw originally, no? |
We previewed it on @droumis 's machine last time. Also, not sure if he used the same resampled data tree as me. A is the "original" method. |
Seeing 2:4 second lag on my end for render updates for this I'm not seeing the blanking when box-zooming, but I'm also not subselecting channels based on the viewport, just time slicing. Andrew, can you show me your channel-slicing approach? Here's the version of the code I used for this. video2300728378.mp4What was the code block we initially saw very good speed with? I'll try that again too |
Assuming the 'original' code block was the following self.plot.document.hold()
try:
Stream.trigger(streams)
finally:
self.plot.document.unhold() With the original approach, I'm seeing slightly faster times, ~1-3 seconds for updates (also, still not channel slicing): video2602508095.mp4 |
Someone should dig into this with the browser performance profiler like we did last time to see what it's doing while you wait for the update. |
I'd define channel_slice like this:
|
Initial Profiling:Baseline (with channel slicing, no render holding):baseline_no-hold.mp4plot.document.holdplot.document.hold.mp4plot.state.hold_renderSometimes can take very long to update, other times very quick plot.state.hold_render.mp4 |
Yes that's the same issue. Thanks for doing the profiling! |
Closing in favor of #6265 |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Philipp suggested this; not sure if the following is necessary: