-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[search-in-workspace] ensure a stable search-in-workspace result order #5669
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement! Works well when I tested it.
packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx
Outdated
Show resolved
Hide resolved
Tested in a large multi root workspace in my local env (vscode + theia + a few other folders). Performance wise it is still good. |
Fixes #4113 Currently, the `search-in-workspace` result order is not consistent/stable and can lead to different ordering between search results. The fix was to ensure that the tree is properly rendered in order in the `onDone` callback. The first step is to sort by the `root folders` and then update it's children by sorting them as well. Signed-off-by: Vincent Fugnitto <[email protected]>
packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx
Show resolved
Hide resolved
Tested again in the setting where I found problems yesterday. Now everything looks good. |
I kept testing and it looks like if we reach the limit and re-attempt the same search the results are not stable, (example: search for I believe this is the #4113 (comment). I'm not sure the PR should address the results from ripgrep or simply ensure that whatever result we do receive should be properly ordered. |
yes. once it reaches the limit, the backend stops searching.
i believe that you have in this PR is a good enough solution for the frontend. |
Fixes #4113
Currently, the
search-in-workspace
result order is not consistent/stable and can lead to different ordering between search results. The fix was to ensure that the tree is properly rendered in order in theonDone
callback. The first step is to sort by theroot folders
and then update it's children by sorting them as well.Signed-off-by: Vincent Fugnitto [email protected]