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

Fix uri transformer slowness over large buffers #171126

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

roblourens
Copy link
Member

Fix #138784

tl;dr of that issue

  • I have a notebook with a really large output, like an image that is many MBs
  • The notebook is dirty
  • When I save, or autosave kicks in, we transfer the entire notebook model data to the EH to serialize
  • This hangs up the EH process for a long time
  • I try to execute a simple cell and it takes a long time, because the EH is stuck

Turns out that most of the CPU time is in _transformIncomingURIs because it is iterating the large output VSBuffer. There will never be a URI in there, so this changes skips them.

As a separate optimization, we could also avoid transferring the full notebook model to save, since the EH should already have this model which has been updated incrementally

@vscodenpa vscodenpa added this to the January 2023 milestone Jan 12, 2023
@sandy081 sandy081 removed their request for review January 12, 2023 09:32
Copy link
Member

@jrieken jrieken left a comment

Choose a reason for hiding this comment

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

lgtm

fyi @alexdima who wrote this

@roblourens roblourens merged commit 58eba95 into main Jan 12, 2023
@roblourens roblourens deleted the roblou/planned-barnacle branch January 12, 2023 17:04
@github-actions github-actions bot locked and limited conversation to collaborators Feb 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jupyter over remote ssh sometimes becomes slow and/or unresponsive
3 participants