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

DynamicMap with streams force callback on first lookup after refresh #858

Merged
merged 11 commits into from
Sep 12, 2016

Conversation

philippjfr
Copy link
Member

Currently the plotting code will request a particular key from a single DynamicMap multiple times during plotting which should be avoided due to potentially random state.

@@ -672,7 +673,8 @@ def __getitem__(self, key):

# Cache lookup
try:
if util.dimensionless_contents(self.streams, self.kdims):
if (util.dimensionless_contents(self.streams, self.kdims) and
not self._stream_cache_lookup):
raise KeyError('Using dimensionless streams disables DynamicMap cache')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From our discussion, we think it ought to be something like:

if (util.dimensionless_contents(self.streams, self.kdims)
                  raise KeyError('Using dimensionless streams disables DynamicMap cache')
elif self._disable_cache_lookup:
                  raise KeyError('Cache lookup disabled')

That way the variable isn't about streams and you can disable cache lookup on dynamic maps not matter how they are (or aren't) using streams.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we decided in the end that it is about streams.

@jlstevens
Copy link
Contributor

All looks good now! Happy to merge once the tests pass.

@jlstevens
Copy link
Contributor

Tests are passing. Merging.

@jlstevens jlstevens merged commit 42098c4 into master Sep 12, 2016
@philippjfr philippjfr deleted the dynamic_use_cache branch September 27, 2016 22:22
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants