Skip to content

feat(dataview): read data rows truely on demand#1717

Open
Fred-Wu wants to merge 2 commits into
REditorSupport:masterfrom
Fred-Wu:feat/lazy-dataview-loading
Open

feat(dataview): read data rows truely on demand#1717
Fred-Wu wants to merge 2 commits into
REditorSupport:masterfrom
Fred-Wu:feat/lazy-dataview-loading

Conversation

@Fred-Wu

@Fred-Wu Fred-Wu commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR attempts to introduce a true on demand data loading from R.

The RC already introduced a dynamic data viewer, but R still prepared data for all columns when the viewer opened. This included creating the full row index, splitting matrix columns, and converting an entire Arrow object data to data frame. Values were also formatted as text.

What changes

On-demand loading

  • Keep the original R data without preparing all columns.
  • Read only column information initially.
  • Read and convert only the requested rows during scrolling.
  • Support R data frames, matrices, Arrow data and Polars DataFrames.
  • Preserve numeric, logical, date and text values instead of formatting everything as text.
  • Sorting and filtering now remember the matching row order, so scrolling does not repeat the same work.

Data Viewer Changes

  • Disables sorting and filtering for:
    • Complex number columns
    • List columns
    • Raw columns
    • The row-number column
  • Sorts ordered factors according to their declared R level order.
  • Show (filtered/original) in the row-number heading when filtering is active.

If this is accepted, and works well, probably could remove those 2 pagination settings as well. Here is an example to open 10M records with 100 columns.

demo.mov

Fred-Wu added 2 commits July 1, 2026 01:53
- Keep the original R data source and slice only requested rows instead of
preparing complete columns when the viewer opens.

- Avoid full Arrow conversion, support Polars DataFrames, preserve R value types,
and reuse sorting and filtering results when the viewer requests more rows.
…ta types

- use dateString and dateTimeString for R Date and POSIX values
- use bigint for R integer64 values
- make bit64 an optional package dependency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant