-
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] Search finds different substrings of search term #7282
Comments
Might it be a symptom of #889? (and potentially slow networks speeds) |
Maybe it really has something to do with network latencies. When I start Theia in a local Docker container I'm not able to reproduce this as well. Started in the cloud (here Gitpod) I have this almost always. Although I don't notice any other limitations in terms of internet speed. |
I'm pretty sure there is a race :) Someone just needs to read the code carefully a part where we trigger search on typing and process results, something is not cancelled or queued properly and previous results override latest. |
Description
When I type a search term in the search widget of Theia it starts the search on keystroke in the background. However, this leads to search result with different substrings of my current search term in the result list. E.g. I search for “ContainerMod” and the result list has results where “contai”, “contain”, and “container” are highlightend as search matches:
As you can see, the same search result (the same line/word) is listed for each substring.
There seems to be race condition / sync problem in creating the result list.
Reproduction Steps
Type into the search box a search term and keep typing while the search is performed in the background. E.g. search for “ContainerModule”. Stop typing and wait for the result list. See the duplicates / substring matches.
I've seen it happen dozens of times. That means it is reproducible for me.
OS and Theia version:
yarn start
)The text was updated successfully, but these errors were encountered: