JupyterLab Full Windowing mode

I am curious to understand how does the full windowing mode works in Jupyterlab, while the docs says it only renders the visible cells, in the actual DOM it shows the content of the output cells. I was under the impression that it somehow works like virtual rendering where the DOM nodes are updated on scroll but does not seems like so, do we think its worth documenting the high level design of the full windowing mode implementation to allow extension developer take various decisions for the scalability aspects.

The cell editor is detached, but cell outputs are not detached because the state of widgets would be lost if we did that. Instead we just hide the outputs with display: none which removes them from layout and thus improves rendering performance:

Additionally, the active cell editor is never removed to allow it to recieve user input when scrolled away. The bulk of the logic for windowing is in caching, estimates sizes and making the scrolling and search work.

In future the implementation may change, as even if we do not detach the outputs from DOM, toggling display and manipulating their size is problematic. I opened some enhancement proposals on how we could make it better:

Though both of these proposals relay on novel browser features which are not yet widely supported.

1 Like