You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We made some performance improvements for scrollable notebook outputs with large amounts of streaming output while a cell is being executed by appending to the DOM rather than replacing large amounts of elements. All other behavior should remain the same.
Setup (If you don't have python set up to run notebooks)
ensure python is installed on your machine
open a workspace where you will be running tests for this TPI
Create: new jupyter notebook and run print(1) in a cell.
a. If the cell runs successfully, you're already set up,
b. otherwise select "change kernel" in the pop-up that informs you about missing packages (unless the kernel picker opened in the quick pick, then just go to step 4)
The kernel picker should open, select "Python Environments..." -> "Create Python Environment..." and select the base interpreter to use
a. All necessary packages should be installed and the cell should run successfully
Testing
ensure "notebook.output.scrolling": true
Run some cells that will force a lot of rendering actions to happen quickly, which can be done by making a flush call to push the updated output content to the renderer. Pushing the numbers too high will still cause slowdowns, but should still be improved. examples:
Lots of rendering
import sys
for i in range(5000):
print('{!r} {!r}'.format(list(range(10)), i), file=sys.stderr)
sys.stderr.flush()
Lots of previous data per render
for i in range(300000):
print('{!r} {!r}'.format(list(range(10)), i), file=sys.stderr)
import sys
for i in range(100):
print('{!r} {!r}'.format(list(range(10)), i), file=sys.stderr)
sys.stderr.flush()
Lots of new data per render
This one is still pretty slow since it still often needs to replace a large amount DOM structure
import sys
itr = 0
for i in range(10):
for j in range(4444):
itr = itr +1
print('{!r} {!r} {!r}'.format(itr, j, i), file=sys.stderr)
sys.stderr.flush()
The text was updated successfully, but these errors were encountered:
Refs: #182636
Complexity: 3
Create Issue
Summary
We made some performance improvements for scrollable notebook outputs with large amounts of streaming output while a cell is being executed by appending to the DOM rather than replacing large amounts of elements. All other behavior should remain the same.
Setup (If you don't have python set up to run notebooks)
Create: new jupyter notebook
and runprint(1)
in a cell.a. If the cell runs successfully, you're already set up,
b. otherwise select "change kernel" in the pop-up that informs you about missing packages (unless the kernel picker opened in the quick pick, then just go to step 4)
a. All necessary packages should be installed and the cell should run successfully
Testing
flush
call to push the updated output content to the renderer. Pushing the numbers too high will still cause slowdowns, but should still be improved. examples:Lots of rendering
Lots of previous data per render
Lots of new data per render
This one is still pretty slow since it still often needs to replace a large amount DOM structure
The text was updated successfully, but these errors were encountered: