Skip to content

Notebooks: virtualize cell rendering (and/or infinite scroll) to cut memory and network usage #576

Description

@emrberk

All cells render at once — ListLayout maps the full cells array and grid mode maps all via ResponsiveGridLayout (src/scenes/Editor/Notebook/index.tsx). The cap is MAX_NOTEBOOK_CELLS = 50 (src/store/notebook.ts:6), but every cell keeps a mounted Monaco editor, an echarts instance (with ResizeObserver + wheel listeners, src/scenes/Editor/Notebook/CellChart/ChartRenderer.tsx), and any auto-refresh polling running even off-screen — so 50 chart cells = 50 live editors + 50 polling charts.

@tanstack/react-virtual and react-virtuoso are already in package.json but unused in the notebook.

Ask: virtualize/window the list so off-screen cells are cheap, and/or pause off-screen auto-refresh and network polling (e.g. via IntersectionObserver). Note: list mode virtualizes cleanly (dynamic heights); grid mode (react-grid-layout, absolute positioning) is harder and may stay as-is initially.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Severity: 2enhancementNew feature or requestnotebooksIssues relevant to the notebooks featureweb-consoleIssues relevant to "web-console" package

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions