Skip to content

project search: Stream search results to improve TTFB#16923

Merged
ConradIrwin merged 13 commits intomainfrom
streaming-project-search
Aug 27, 2024
Merged

project search: Stream search results to improve TTFB#16923
ConradIrwin merged 13 commits intomainfrom
streaming-project-search

Conversation

@ConradIrwin
Copy link
Member

@ConradIrwin ConradIrwin commented Aug 26, 2024

This is a prototype change to improve latency of local project searches. It refactors the matcher to keep paths "in-order" so that we don't need to wait for all matching files to display the first result.

On a test (searching for < in zed.dev) it changes the time until first result from about 2s to about 50ms. The tail latency seems to increase slightly (from 5s to 7s) so we may want to do more tuning before hitting merge.

Release Notes:

  • reduces latency for first project search result

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Aug 26, 2024
@SomeoneToIgnore
Copy link
Contributor

Overall, does it make much sense to do if we intend to track local project symbols in the near future?
If we intend on doing that, we can use some form of a trigram index for the same purpose, much more effectively than streaming.

@ConradIrwin ConradIrwin force-pushed the streaming-project-search branch from dcbbf69 to 864024c Compare August 27, 2024 15:19
@mrnugget mrnugget changed the title streaming project search project search: Stream search results to improve TTFB Aug 27, 2024
@ConradIrwin ConradIrwin force-pushed the streaming-project-search branch from 559d2d8 to 75d3e90 Compare August 27, 2024 15:22
@ConradIrwin ConradIrwin marked this pull request as ready for review August 27, 2024 15:36
@ConradIrwin ConradIrwin merged commit b2f3f76 into main Aug 27, 2024
@ConradIrwin ConradIrwin deleted the streaming-project-search branch August 27, 2024 15:37
@SomeoneToIgnore
Copy link
Contributor

image

This broke the ordering of the elements and now outline panel's order is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants