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

transition_memory_released and get_nbytes() optimizations #4516

Merged
merged 3 commits into from
Feb 23, 2021

Conversation

jakirkham
Copy link
Member

@jakirkham jakirkham commented Feb 19, 2021

Optimize a few things in transition_memory_released.

To avoid calling TaskState.get_nbytes() repeatedly in a few cases, assign the result to a variable and reuse it.

  • Closes #xxxx
  • Tests added / passed
  • Passes black distributed / flake8 distributed

The one case where this variable is used it is a `dict`. So go ahead and
annotate it that way. Should speed up usage of this variable when
cythonized.
To avoid calling this method repeatedly in a few cases, assign the
result to a variable and reuse it.
@jakirkham jakirkham changed the title Assign ts.get_nbytes() to a variable transition_memory_released and get_nbytes() optimizations Feb 19, 2021
@jakirkham
Copy link
Member Author

Planning on merging end of day Monday if no comments

@quasiben
Copy link
Member

Looks good to me

@jakirkham jakirkham merged commit 7146449 into dask:master Feb 23, 2021
@jakirkham jakirkham deleted the typ_ts_nbytes branch February 23, 2021 00:12
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