500M CSV rows in a browser tab at ~1 GB RAM. no row limit, zero deps, no server ...
HN Best 200 @best
500M CSV rows in a browser tab at ~1 GB RAM. no row limit, zero deps, no server github.com · 12 points · 1 comments · HN thread
TL;DR p10node's office-engine is a zero-dependency JavaScript library that renders and edits DOCX, XLSX, PPTX, Apple iWork files, CSV/text/Markdown/HTML/SVG and Mermaid, PlantUML and Graphviz diagrams entirely in the browser, running parsing in a Web Worker. The README claims a 55 GB CSV (500M rows) opens in about 4.5 minutes with the tab staying under 1 GB of memory, by reading rows from the file on demand as they scroll into view.
- Parsing, layout, formulas, diagrams and ZIP handling run in a Web Worker; no files leave the browser and no server is required.
- Large CSVs are streamed: the first screen appears in seconds, about 12 million cells stay in memory, and other rows are read from the file as they scroll into view.
- Reported timings in headless Chromium on Apple M-series: 100M rows (10.6 GB) in about 50 s, 500M rows (55 GB) in about 4.5 min, with memory under 1 GB.
- XLSX support targets Excel's full 1,048,576 × 16,384 grid; 300k rows open in about 2 s, and formulas (134 functions) are supported.
- Edits save back to the original format, regenerating only changed parts so untouched parts keep their original bytes.
- Distributed as an npm package with a React component (DocViewer), a vanilla mount() API, a web component, and a single script build; MIT licensed.
Discussion Only one comment has been posted, so there is no real thread. It questions the memory claim: the commenter reads the benchmark as meaning that only about 1 GB is needed for the rows currently visible on screen, a point that matches the README's description of a sliding window of loaded cells. The mood is neutral and brief, with a light joke about the submission's slow comment timing.
- The 1 GB figure refers to the visible window, not the whole file (a few): The single commenter reads the result as memory being spent on the on-screen window of rows, with the rest read from disk on demand. That is consistent with the README's streaming design, though the comment does not test or confirm it.
#browser #csv #webAssembly #documentViewer #zeroDependencies