Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I recently came across someone maintaining a 0.5GB full text index to support searching their shell history, 100k commands. I use grep on a flat file, and testing now it takes 200ms for a query across my 180k history entries.

I just started using a tool that stores my bash history and replaces C-R that I found on HN, it's written in Rust and uses SQLite of course. But it'll randomly cause commands to pause for a few seconds before executing (I think the hook to write the command to history gets blocked). Probably some simple bug, but I could just have my command history in a flat file and use rg or fzf in a 5 line shell function and have no lag.



Okay getting real off-topic now (welcome to HN) but this is not what I expected:

https://github.com/ellie/atuin/issues/952#issuecomment-15378... https://github.com/openzfs/zfs/issues/14290

Apparently when SQLite calls `ftruncate` on the `-shm` file, ZFS will sometimes block for several seconds. Maybe it's waiting for txg timeout? Strange.


Can you share the tool? I've been thinking of making something similar for fun backed by a suffix array, interested in what else is out there.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: