Skip to content

rewrite the data viewer to improve performance and remove aging dependencies #17539

Closed

Description

@kevinushey

Intent

The data viewer is currently built on jQuery DataTables with a
DataTables Scroller virtual-scroll plugin and a custom server-side
data source. The stack has accumulated friction worth addressing:

Performance

  • Render and scroll latency grows visibly on data frames in the tens
    of thousands of rows, especially with many columns visible.
  • Column sort, filter, and resize operations run through DataTables'
    full lifecycle, which is heavier than the work actually requires.
  • Memory footprint grows as the user navigates large frames.

Aging dependencies

  • jQuery and DataTables (plus dataTables.scroller,
    closest_polyfill.js, and the bundled jQuery DataTables CSS) ship
    as vendored third-party code totaling roughly 16k lines that is
    rarely touched and not actively developed against the patterns we
    use here.
  • DataTables' virtual-scroll model interacts poorly with modern
    browser scroll/render optimizations and limits what we can do for
    pinned columns, auto-sizing, and per-column UI.

Maintainability

  • Pinned columns, column pagination, and filter UI sit awkwardly on
    top of DataTables. Small additions (e.g. a summary sidebar with
    per-column sparklines) require fighting the framework's lifecycle.

Proposal

Replace the data viewer iframe contents (src/cpp/session/resources/grid/)
with a self-contained virtual-scroll grid:

  • Custom virtual scroller with row recycling and an LRU row cache.
  • No jQuery or DataTables dependency; the only third-party files
    removed (jquery.dataTables.*, dataTables.scroller.*,
    closest_polyfill.js) are not replaced.
  • First-class support for pinned columns, column pagination for wide
    frames, server-driven column auto-sizing, sort / filter / global
    search, and per-object state persistence.
  • New Summary sidebar with type, NA count, and a sparkline histogram
    for numeric columns.
  • Keyboard navigation (arrow keys, Home/End, PageUp/PageDown) and
    clipboard copy of the active cell.

Status

Work in progress on feature/data-viewer-rewrite. PR to follow.

Activity

  1. added
    new
    on May 5, 2026
  2. self-assigned this
    on May 5, 2026
  3. added this to the Golden Wattle milestone on May 5, 2026
  4. added theissue type on May 6, 2026
  5. ronblum commented on May 7, 2026

    @ronblum
    Contributor

    Played around with it a bunch in RStudio Desktop 2026.05.0-daily+167 on Windows 11. Verified created and works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

data viewerenhancementnew

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions