Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo name searcher does serial repohasfile filtering #4833

Closed
keegancsmith opened this issue Jul 9, 2019 · 6 comments · Fixed by #5189

Comments

@keegancsmith
Copy link
Member

commented Jul 9, 2019

For queries such as r:sourcegraph repoHasFile:Dockerfile the repoHasFile filtering is done serially. This should be batched.

https://github.com/sourcegraph/sourcegraph/blob/2879ccb/cmd/frontend/graphqlbackend/search_repositories.go#L60

Proposal: Adjust repoShouldBeAdded to take a slice of repositoryRevisions.

@keegancsmith

This comment has been minimized.

Copy link
Member Author

commented Jul 9, 2019

This bit of perf work is important for 3.6, since this feature was introduced this iteration and contains poor perf in this instance. cc @sourcegraph/core-services @ijt @attfarhan @nicksnyder

@attfarhan

This comment has been minimized.

Copy link
Contributor

commented Jul 9, 2019

Proposal SGTM. Is this something you want someone on the search team to work on, or will core services handle this?

@slimsag

This comment has been minimized.

Copy link
Member

commented Jul 9, 2019

@ijt ijt modified the milestones: 3.6, 3.7 Jul 10, 2019

@ijt ijt changed the title repo name searcher does serial repoHasFile filtering repo name searcher does serial repohasfile filtering Aug 12, 2019

@ijt

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

@keegancsmith

This comment has been minimized.

Copy link
Member Author

commented Aug 13, 2019

@ijt we already use zoekt if the repo is indexed. The issue here is we call repoShouldBeAdded serially. Instead we should pass in the full list of repos to search. This will automatically split between zoekt and searcher.

IE this line needs to take in a list https://github.com/sourcegraph/sourcegraph/blob/2879ccb/cmd/frontend/graphqlbackend/search_repositories.go#L88

@ijt

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

Ah, I see. Updated the doc. I'll give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.