sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.28k forks source link

Use ripgrep for unindexed search #19550

Closed slimsag closed 8 months ago

slimsag commented 3 years ago

Pie-in-the-sky idea: use ripgrep for unindexed search. I know we've had prior thoughts here by others, but today we have a legit reason for why doing this would help customers (code insights.)

Code insights has a historical data backfiller which locates a Git commit near a historical point in time, and runs a search against that commit to determine "how many results for query X existed at point Y in time?"

Almost all of these Sourcegraph commit searches (unless it's literally HEAD/main/master) will go directly to git grep, which is pretty slow and one of the reasons we make the backfiller go so slowly (so as to not overload gitservers.)

We could likely use ripgrep for unindexed search and see a substantial performance boost for these types of unindexed searches.

Unsure of exactly how much time would be needed to implement this. (I don't imagine too complex: checkout the right git revision, run ripgrep over it - instead of git grep in the bare git repo)

github-actions[bot] commented 3 years ago

Heads up @joelkw @felixfbecker - the "team/code-insights" label was applied to this issue.

github-actions[bot] commented 3 years ago

Heads up @lguychard - the "team/search" label was applied to this issue.

stefanhengl commented 8 months ago

This issue has been inactive for a long time. To reopen the ticket, please let us how to reproduce the issue on latest main. For feature requests, please let us know what is still missing.