Projects01
DataInspector
A data viewer for CSV, JSON, XML and YAML files with hundreds of millions of records. It inspects them in place, without loading them into memory or writing a single byte to disk.
- Role
- Developer
- Stack
- Python, Tkinter, Django, PyInstaller
- Type
- Desktop + local web app
- Year
- 2026
- Tests
- 135 tests
- Links
- GitHub ↗
By the numbers
- < 0.5sFirst page of a 112 GB file
- 0.4msJump to any row
- 1.6MBIndex RAM for 205 million records
- ~800MB/sSearch without an index
Interactive Sparse-Index Simulator
Enter any row number in a 112 GB (205 million rows) file to see how DataInspector jumps directly to the nearest 1,000-row offset and scans at most 999 lines forward.
- Offset index
- offset[84,210]
- Rows scanned
- 519
- Estimated latency
- 0.38 ms
- Index RAM / Disk write
- 1.6 MB · 0 B
01Problem
Opening very large data files is harder than it sounds. General-purpose editors freeze while reading the file. Most data tools either load the file into memory or first convert it to another format, which costs memory and disk both.
The question was: how do I inspect a file with hundreds of millions of records, in place, without making the user wait?
02Approach
The whole design rests on one assumption: one record = one line. Finding record N then means finding the Nth \n byte. There is no need to parse the file.
- Sparse index — one offset is stored every 1,000 records. For 205 million records the index takes 1.6 MB of RAM.
- Jump and scan — going to the nearest offset and scanning forward at most 999 lines is enough.
- Background threads — reading and searching run off the UI thread, so the interface never freezes.
- Four formats, one engine — CSV/TSV, JSON/JSONL/NDJSON, XML and YAML share the same indexing and search code.
- Two interfaces, one core — the desktop (Tkinter) and local-network web (Django) interfaces use the same
livedata/core.
03Result
- Format detection takes about 10 ms; the first page of a 112 GB file appears in under 0.5 seconds.
- Text and regex search without an index, streaming at about 800 MB/s.
- Sorting without writing to disk: within a page and over the first N results.
- Multi-select; export to Excel, Word and PDF using only the standard library.
- Base64 field decoding across columns.
- A warning if the source file changes; files that do not have one record per line are rejected.
- A desktop interface with an Office-style ribbon and Windows 11 Fluent light/dark themes.
- Packaged with PyInstaller as a single .exe of about 12 MB; 135 tests pass.
What I learned
Writing an assumption down and rejecting input that violates it gives a sturdier foundation than trying to handle every input somehow.
Keeping memory and disk use independent of file size is not an optimization added later; it has to be a design constraint from the start.
Giving the UI thread only drawing work makes the “the UI never freezes” rule easy to audit.
