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

Remove spawn_blocking from version map #1966

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

konstin
Copy link
Member

@konstin konstin commented Feb 25, 2024

I previously add spawn_blocking to the version map construction as it had become a bottleneck (https://github.com/astral-sh/uv/pull/1163/files#diff-704ceeaedada99f90369eac535713ec82e19550bff166cd44745d7277ecae527R116). With the zero copy deserialization, this has become so fast we don't need to move it to the thread pool anymore. I've also checked DataWithCachePolicy but it seems to still take a significant amount of time. Span visualization:

Resolving jupyter warm:

image

Resolving jupyter cold:

image
image

I've also updated the instrumentation a little.

We don't seem cpu bound for the cold cache (top) and refresh case (bottom) from jupyter:

image

image

@konstin konstin added the performance Potential performance improvement label Feb 25, 2024
Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

Lovely!

@charliermarsh charliermarsh enabled auto-merge (squash) February 25, 2024 21:00
@charliermarsh charliermarsh enabled auto-merge (squash) February 25, 2024 21:00
@charliermarsh
Copy link
Member

The dreaded thread 'main' has overflowed its stack on Windows debug builds.

@charliermarsh charliermarsh force-pushed the konsti/remove-spawn-blocking-from-version-map branch 2 times, most recently from ca32057 to ce60678 Compare February 26, 2024 02:35
@konstin konstin force-pushed the konsti/remove-spawn-blocking-from-version-map branch from ce60678 to 4965e75 Compare February 26, 2024 09:30
@charliermarsh charliermarsh merged commit 70dad51 into main Feb 26, 2024
7 checks passed
@charliermarsh charliermarsh deleted the konsti/remove-spawn-blocking-from-version-map branch February 26, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Potential performance improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants