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

Speed up Client.map by computing token only once for func and kwargs #8855

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

fjetter
Copy link
Member

@fjetter fjetter commented Sep 3, 2024

tokenization is unfortunately expensive at times. Especially if we're iterating over a large collection this can be expensive.

Note: The tokenize(tok, args) is also expensive but mostly because of the ctxmanager foo we're doing in tokenize so calling it often is expensive. We should think about a fast path for this

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

LGTM thanks @fjetter

Copy link
Contributor

github-actions bot commented Sep 3, 2024

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    25 files  ±0      25 suites  ±0   10h 14m 39s ⏱️ + 5m 12s
 4 122 tests ±0   4 007 ✅ +1    111 💤 ±0  4 ❌  - 1 
47 615 runs  ±0  45 503 ✅ +2  2 108 💤 ±0  4 ❌  - 2 

For more details on these failures, see this check.

Results for commit a86d739. ± Comparison against base commit 2e61816.

@jrbourbeau jrbourbeau changed the title Speed up Client.map by computing token only once for func Speed up Client.map by computing token only once for func and kwargs Sep 3, 2024
@jrbourbeau jrbourbeau merged commit c473680 into dask:main Sep 3, 2024
26 of 33 checks passed
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