Skip to content

Commit

Permalink
Speed up Client.map by computing token only once for func
Browse files Browse the repository at this point in the history
… and ``kwargs`` (#8855)
  • Loading branch information
fjetter authored Sep 3, 2024
1 parent 2e61816 commit c473680
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion distributed/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,9 @@ def _keys(self) -> Iterable[Key]:

else:
if self.pure:
tok = tokenize(self.func, self.kwargs)
keys = [
self.key + "-" + tokenize(self.func, self.kwargs, args) # type: ignore
self.key + "-" + tokenize(tok, args) # type: ignore
for args in zip(*self.iterables)
]
else:
Expand Down

0 comments on commit c473680

Please sign in to comment.