Story

News.Y Combinator.com

molchanovartem Wednesday, December 10, 2025

Hi HN, author here.

I built this because I was tired of VS Code freezing or crashing whenever I accidentally opened a multi-gigabyte log file. While less or tail -f are great, I wanted the IDE features (regex search, copy-paste, highlighting) without the context switch.

This is a VS Code extension that spawns a Rust sidecar to handle the heavy lifting.

How it works:

1. I/O: It uses memmap2 to map the file into memory. This lets the OS manage paging, so opening a 10GB file consumes virtually no heap memory in the process.

2. Indexing: On load, it does a single pass to build a line index (Vec<u64> offsets). This allows O(1) access to any specific line range.

3. Frontend: The UI is a Webview with aggressive virtualization. Since browsers have a limit on element height (often around ~10M pixels), I implemented a coordinate scaling system to support scrolling through files with millions of lines.

4. Search: It runs in the Rust backend using the regex crate, streaming results back to the UI in chunks to avoid blocking the thread.

5. IPC: Communication happens via Stdin/Stdout JSON streaming.

Features:

- Instant open for large files (tested up to ~10GB).

- Follow mode (tail -f implementation with 500ms polling).

- Filtering that keeps real line numbers (useful for correlating with stack traces).

- Cross-platform binaries included (Mac/Linux/Win).

The code is open source, and I'd love to hear your thoughts on the Rust implementation, especially regarding the mmap safety or potential optimizations for the search logic.

Repo: https://gitlab.com/molchanov.artem.1994/log-analyzer-pro Marketplace: https://marketplace.visualstudio.com/items?itemName=molchanovartem1994.log-analyzer-pro

1 0
Read on Hacker News