Webapp should pre-fetch some search result highlights
Created by: slimsag
Currently the request flow for a search looks like:
- GraphQL search request -> results
- result.file[0] -> highlight file request
- result.file[1] -> highlight file request
- result.file[2] -> highlight file request
- ...
We could send back highlighted files as part of the initial GraphQL search request (for e.g. the first 10 results only) to reduce round-tripping latency from being induced. This would help improve search result load times substantially when there is a fair amount of latency between the client and server.
(this suggestion came from chatting with Keegan)
Related to (but distinct from): https://github.com/sourcegraph/sourcegraph/issues/6992