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

Optimized dynamic bokeh plots #968

Merged
merged 1 commit into from
Nov 4, 2016
Merged

Optimized dynamic bokeh plots #968

merged 1 commit into from
Nov 4, 2016

Conversation

philippjfr
Copy link
Member

Previously we added some optimization that avoids sending updated plot data if the data source is unchanged between frames. However the plotting class still went through the effort of updating the datasource even though it is unchanged, which can in some cases be fairly expensive in itself. This generalizes the previous optimization such that the data is only updated in dynamic mode if it has changed.

Avoid updating unchanged data sources
@jlstevens
Copy link
Contributor

jlstevens commented Nov 4, 2016

As a generalization of a previous optimization, this seems ok. The core condition seems to be:

self.static_source = self.dynamic and (current_id == previous_id)

Looking at the code, it seems that this self.static_source attribute now controls whether the datasource is updated and whether the (un)changed plot data is sent (or not). Overall this seems clearer than before (and more efficient) so I will now merge.

@jlstevens jlstevens merged commit 0ff7d8e into master Nov 4, 2016
@philippjfr philippjfr deleted the static_source_opt branch December 10, 2016 23:42
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

Successfully merging this pull request may close these issues.

2 participants