Skip to Content
OpenPreview

Large files

How OpenPreview keeps 500-page PDFs, 100,000-row spreadsheets, million-row CSVs and huge logs fast, with workers and windowed rendering.

WhatHow
Office, OpenDocument and CSV files of 512 KB and upParsed in a Web Worker (workers, on by default), so the page stays responsive while they load. If the worker cannot start, parsing falls back to the main thread.
PDFOnly pages near the view are drawn; far pages release their memory. Search uses a background text index.
Excel sheets over 2,000 rowsRows are windowed in blocks that never split a merge; sheet XML is streamed instead of built into a tree.
CSV over 1,000 rowsWindowed rows with fixed column widths, up to a million rows.
Text over 3,000 linesWindowed blocks of lines, with line numbers, search and print over the whole file.
Word and PowerPointPages and slides off screen skip layout and paint (content-visibility).

Measured on the samples in our repository (a 100,000-row workbook): browser memory went from 521 MB to 188 MB with streaming, and the longest main-thread task from 0.79 s to 0.23 s with the worker.

Use maxBytes to refuse files you do not want to open at all.