Comment by jhgg
3 years ago
Because it would be obscenely expensive (in terms of computational resources) to search history via grep. Hence why we use an inverted index.
3 years ago
Because it would be obscenely expensive (in terms of computational resources) to search history via grep. Hence why we use an inverted index.
This is megabytes (at most) of text we're talking about, not gigabytes. And ripgrep is absurdly fast. Grepping a 5MB text file should be pretty much instantaneous.
Do you know of any service that is running at scale out there that stores their data as 5mb plain text files?
The “text files” don’t have to be the primary backing store - merely a derived cache file that can be periodically refreshed with new content. It doesn’t have to be text either - SQLite is pretty structured if you need more features in a minimal container too.