Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

codeintel: returns surroundingContent from search result#64022

Merged
kritzcreek merged 1 commit into
mainfrom
christoph/use-content-lines-from-search
Jul 25, 2024
Merged

codeintel: returns surroundingContent from search result#64022
kritzcreek merged 1 commit into
mainfrom
christoph/use-content-lines-from-search

Conversation

@kritzcreek

Copy link
Copy Markdown
Contributor

Closes https://linear.app/sourcegraph/issue/GRAPH-765/use-surroundingcontent-returned-from-the-search-client

The primary reason for doing this is to avoid sending a bunch of extra calls for file contents to gitserver, which dominate the profile/trace after implementing the remaining opts from https://github.com/sourcegraph/sourcegraph/pull/63971

Also limits the API to only return the line containing the match for now as discussed with Camden.

We might need to bring back the lineGetter for precise usages, but it should be easy enough to revive at that point /cc @varungandhi-src

Test plan

Updated unit tests, some manual testing in the API console

Also limits the API to only return the line containing the match for
now as discussed with Camden.
@kritzcreek kritzcreek requested a review from keynmol July 24, 2024 02:45
@cla-bot cla-bot Bot added the cla-signed label Jul 24, 2024
@github-actions github-actions Bot added team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/product-platform labels Jul 24, 2024
@kritzcreek kritzcreek merged commit e050214 into main Jul 25, 2024
@kritzcreek kritzcreek deleted the christoph/use-content-lines-from-search branch July 25, 2024 07:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/product-platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants