logoalt Hacker News

fpolingtoday at 8:38 AM1 replyview on HN

SQLite gives indexes that makes searching and locating previous entries much faster. This is relevant when the history is over 100K entries and one wants to avoid duplicates in history files.


Replies

OskarStoday at 8:52 AM

I think you're underestimating the speed of modern computers and hard-drives, fzf can search through 100k entries easily without any delay. Try it with `cat /usr/share/dict/words | fzf`, it's extremely responsive (my dictionary is about 235k lines). If you want hard numbers, try piping your shell history through `time grep` and see how long finding an entry takes.

Even if you're on spinning rust, your shell history is probably in cache. You don't really need FST index for this usecase, IMHO.

show 2 replies