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

Possible perf issue due to unnecessary rendering of outputs when outputs are not visible #207748

Open
DonJayamanne opened this issue Mar 14, 2024 · 0 comments
Assignees

Comments

@DonJayamanne
Copy link
Contributor

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: N/A
  • OS Version: N/A

Steps to Reproduce:

  1. Install Jupyter Exetnsion
  2. Create a notebook and run a cell with the following code (with a valid png file)
from IPython import display
display.Image("/<path>/output.png")
  1. Copy the above cell along with the output and past this into the same notebook around 10-30 times or more
  2. Close the notebook and re-open it
  3. There are a lot of messages logged in the devtools console window about rendering image mime types (even when all outputs are not visible).
Rendering mimeType image/png Object
renderers.js:2 request Object
renderers.js:2 Rendering mimeType image/png Object
renderers.js:2 request Object
renderers.js:2 Rendering mimeType image/png Object
renderers.js:2 request Object

Note: At this point in time only a few cells are visible

In fact if you create a large code cell to occupy the whole notebook and reload you can still run into this same issue.

This leads me to believe theres a possible perf issue as we're rendering images when we should not.
Hence if we have a notebook with large outputs and a large number of them, then it will freeze or hang vscode.

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

No branches or pull requests

3 participants