sourcegraph/internal/settings
Camden Cheek f3f8151c51
Search: respect the search.contextLines setting in the backend (#58943)
Currently, we do not respect the search.contextLines setting in the backend. Specifically, the search backend currently always yields results with zero lines of context.

One effect of this is in order to display matches with context lines, any client needs to make a followup request to fetch the full contents of the file. This makes the UI feel laggy because results filter in slowly as you scroll. This is exacerbated by the fact that we load the highlighted code, and highlighting can be unpredictable, sometimes taking a couple seconds to return.

We already stream the matched chunk back to the client, so this just updates the backend so that the streamed results include the number of context lines a user requested. Zoekt already supports this, so it was just a matter of taking advantage of that setting and updating searcher to do the same.
2023-12-15 16:32:25 -07:00
..
BUILD.bazel Settings: make DB calls sequentially (#53803) 2023-06-20 21:14:29 +00:00
settings_test.go Search: respect the search.contextLines setting in the backend (#58943) 2023-12-15 16:32:25 -07:00
settings.go Tracing: final cleanups (#54694) 2023-07-13 10:16:11 +02:00