Join Nostr
2026-01-15 04:27:46 UTC

r1w1s1 on Nostr: I saw this post and it motivated me to do a quick test: Stop opening huge files in ...

I saw this post and it motivated me to do a quick test:
https://phanpy.social/#/hachyderm.io/s/115891592999188880

Stop opening huge files in screen editors.

Screen editors (nvi, vim, etc.) assume you want to scroll,
see context, and move a cursor interactively.
Huge files break those assumptions.

For large files (1GB+):


Inspect: head, tail, grepUnderstand structure: awk, sed -n (stream, don’t load)Surgical changes: ed or sedOpen a screen editor only when you need to rewrite text.

Benchmark (1GB text file):


nvi -> 20.1s (eager line indexing ~25M lines)vim -> 7.7s (lazy loading, deferred UI cost)ed -> 4.0s (I/O-bound buffering, no TUI overhead)Large files don’t need better editors.
They need better workflows.

For huge files, the right solution is not tuning screen editors,
but using the right tools:


shell tools for inspectioned for known, surgical changesscreen editors when interactive rewriting is actually neededPS:
nvi chooses predictability over perceived speed.
The slowdown is not a flaw — it’s the cost of preserving
classic vi semantics within a screen-editor model.

#vim #vi #ed #unix #linux #cli #sysadmin