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

perf optimizations for large stream notebook outputs #187766

Merged
merged 10 commits into from Jul 18, 2023
Merged

Conversation

amunger
Copy link
Contributor

@amunger amunger commented Jul 12, 2023

for #182636

  • skip rendering outputs if we've already sent a message to the renderer for that version of output
  • added an 'appended' field to the message object for text that was added since the previous showOutput message (not on the API at the moment)
  • streaming output will be appended to a scrollable output element to reduce the amount of DOM manipulation
  • adjusted the limits of lines in the scrollable outputs: if a large output comes in, display up to 5000 lines of it (unchanged) but keep appending output up to 8000 lines.
    • once the 8000 line limit is reached, replace it with the last 5000 lines of the full output. That way we can continue to append on top of that

@amunger amunger requested a review from rebornix July 17, 2023 23:36
@amunger amunger marked this pull request as ready for review July 17, 2023 23:42
@VSCodeTriageBot VSCodeTriageBot added this to the July 2023 milestone Jul 17, 2023
Copy link
Member

@rebornix rebornix left a comment

Choose a reason for hiding this comment

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

Great work, I absolutely love it!

export const scrollableClass = 'scrollable';

const softScrollableLineLimit = 5000;
const hardScrollableLineLimit = 8000;
Copy link
Member

Choose a reason for hiding this comment

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

This is very smart

@amunger amunger merged commit bfdd302 into main Jul 18, 2023
6 checks passed
@amunger amunger deleted the aamunger/notebookOutput branch July 18, 2023 20:55
@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 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.

None yet

4 participants