4 ms·
I've been surprised at how far you can get without indexing. Ex. I always assume we'll need to add an index to speed up GritQL (https://github.com/getgrit/grit
by morgante 2y ago
I've been surprised at how far you can get without indexing.
Ex. I always assume we'll need to add an index to speed up GritQL (https://github.com/getgrit/gritql https://github.com/getgrit/gritql), but we've gotten pretty far with doing search entirely on the fly.
- worldsayshi 2y agoWhat does 'on the fly' entail here?
- simonw 2y agoI'm going to guess brute force - scan everything for the search term, rather than trying to use an index. I'm always amazed at how fast ripgrep (rg) can brute force it's way through hundreds of MBs of source code.
- morgante 2y agoYes, exactly. When doing a search, we parse and search every file without any indexing. Of course, it could still be sped up considerably with an index but brute force is surprisingly effective (we use some of the same techniques/crates as ripgrep).