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
Resizing the running sidebar needlessly re-renders the open tabs section. This is because the OpenTabsSignaler is connected to layoutModified signal indiscriminately, and reiszing is in fact a layout modification.
This is problematic when many tabs are open as it slows down responsiveness of the interface making the resize operation slower. However, since the list is rendered with virtual DOM using React, the performance impact is limited to spurious rerendering rather than to DOM updates.
The listener of layoutModified signal (_emitTabsChanged) should filter out resize operations, or we should use a more granular signal rather than the generic layoutModified
Context
JupyterLab version: 4.1.5
The text was updated successfully, but these errors were encountered:
Description
Resizing the running sidebar needlessly re-renders the open tabs section. This is because the
OpenTabsSignaler
is connected tolayoutModified
signal indiscriminately, and reiszing is in fact a layout modification.jupyterlab/packages/running-extension/src/opentabs.ts
Lines 15 to 18 in 2ceabd8
However, the listener does not filter out the modifications which do not change the open tabs:
jupyterlab/packages/running-extension/src/opentabs.ts
Lines 41 to 47 in 2ceabd8
This is problematic when many tabs are open as it slows down responsiveness of the interface making the resize operation slower. However, since the list is rendered with virtual DOM using React, the performance impact is limited to spurious rerendering rather than to DOM updates.
Reproduce
jupyterlab/packages/running/src/index.tsx
Line 459 in 2ceabd8
Expected behavior
The listener of
layoutModified
signal (_emitTabsChanged
) should filter out resize operations, or we should use a more granular signal rather than the genericlayoutModified
Context
The text was updated successfully, but these errors were encountered: