Computing *args and **kwargs outside of memoization context manager
@@ -647,7 +647,6 @@ class DynamicMap(HoloMap):
kwarg_items = [s.contents.items() for s in self.streams]
flattened = [(k,v) for kws in kwarg_items for (k,v) in kws
if k not in kdims]
- with dynamicmap_memoization(self.callback, self.streams):
if self._posarg_keys:
kwargs = dict(flattened, **dict(zip(self._posarg_keys, args)))
@@ -655,6 +654,7 @@ class DynamicMap(HoloMap):
else:
kwargs = dict(flattened)
+ with dynamicmap_memoization(self.callback, self.streams):
retval = self.callback(*args, **kwargs)
return self._style(retval)
