This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Performance: Lazy highlight search results#40263
Merged
Conversation
Contributor
|
This is a tough trade-off, but I think the lazy highlighting solution is the better solution. The issue with including highlighted HTML in streaming search results is that it blocks all results until the first N results are highlighted. So if we get a huge file to highlight or the highlighting server has a slow day, we massively degrade the UX because we won't show anything. With that in mind, I feel it's better to show something rather than wait for the fully highlighted experience. I tried out the PR locally, and search results feel significantly faster (because the local highlighting is so slow). |
novoselrok
reviewed
Aug 16, 2022
Contributor
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff b8398d8...511e551.
|
novoselrok
reviewed
Aug 17, 2022
valerybugakov
approved these changes
Aug 17, 2022
jdorfman
pushed a commit
that referenced
this pull request
Aug 17, 2022
* Initial * Update to use new format arg * Go * Format * Flag logic * Rename variables to avoid confusion * Additional PR feedback * Improve date use in story to prevent snapshot failure Co-authored-by: Laura Hacker <laura.hacker@sourcegraph.com>
philipp-spiess
referenced
this pull request
Aug 22, 2022
…#40621) A [recent change](https://github.com/sourcegraph/sourcegraph/pull/40263) changed one of the GraphQL queries that the VS Code extension is using to add a new field that was only recently added to the GraphQL backend (c.f. [here](https://sourcegraph.slack.com/archives/C01LZKLRF0C/p1660889509990719)). This unfortunately is not available on "older" server versions including `3.42.1`. This means that every person that updates their VS Code extension release now and is on an on-prem server that lags a bit behind will see the search broken. We do not yet have a system to get the server version and make decisions based on it so I decide to fix it by reverting to the previous query in the VS Code environment (the backend is written in a way that it can handle older clients, just not the other way around).
j-shilling
referenced
this pull request
in j-shilling/cody-lsp-gateway
Jun 20, 2023
… (#40621) A [recent change](https://github.com/sourcegraph/sourcegraph/pull/40263) changed one of the GraphQL queries that the VS Code extension is using to add a new field that was only recently added to the GraphQL backend (c.f. [here](https://sourcegraph.slack.com/archives/C01LZKLRF0C/p1660889509990719)). This unfortunately is not available on "older" server versions including `3.42.1`. This means that every person that updates their VS Code extension release now and is on an on-prem server that lags a bit behind will see the search broken. We do not yet have a system to get the server version and make decisions based on it so I decide to fix it by reverting to the previous query in the VS Code environment (the backend is written in a way that it can handle older clients, just not the other way around).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds lazy syntax highlighting to search results.
Before
LazySearchBefore3.mp4
After
LazySearchAfter2.mp4
Test Plan
Per the videos attached above, ensure the behavior is as expected in-app.
App preview:
Check out the client app preview documentation to learn more.