Skip to content

perf: optimize memory usage by reading preview data on-demand#6

Merged
beeb merged 14 commits into
mainfrom
optimize-memory-usage
Apr 28, 2026
Merged

perf: optimize memory usage by reading preview data on-demand#6
beeb merged 14 commits into
mainfrom
optimize-memory-usage

Conversation

@beeb
Copy link
Copy Markdown
Owner

@beeb beeb commented Apr 28, 2026

This is a huge refactor of the preview system to optimize memory usage. Instead of keeping the context around a match in memory, we only record the byte offsets and the path, and then retrieve the context on-the-fly when it needs to be shown in the preview pane. A cache and pre-fetching makes navigating through the file list quick. I've not been able to see a loading message in my testing, it's quite fast on SSD!

@beeb beeb self-assigned this Apr 28, 2026
@beeb beeb changed the title perf: optimize memory usage perf: optimize memory usage by reading preview data on-demand Apr 28, 2026
@beeb beeb merged commit a836d84 into main Apr 28, 2026
14 checks passed
@beeb beeb deleted the optimize-memory-usage branch April 28, 2026 20:14
@beeb-release-plz beeb-release-plz Bot mentioned this pull request Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant