Skip to content
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 Editor still has 10000 line limit when search.maxResults is set to a value larger than 10000 #129153

Closed
alexzhuaz opened this issue Jul 22, 2021 · 9 comments · Fixed by #130531
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders search-editor verified Verification succeeded
Milestone

Comments

@alexzhuaz
Copy link

Issue Type: Bug

  1. Set search.maxResults to a value larger than 10000
  2. Search some text in file which may have results more than 10000
  3. Click "Open in editor" in search panel
  4. The search editor shows
    "10000 results - 1 file
    The result set only contains a subset of all matches. Be more specific in your search to narrow down the results." and only 10000 results shown in search editor

VS Code version: Code 1.58.0 (2d23c42, 2021-07-08T06:54:55.083Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: Yes
Remote OS version: Linux x64 4.15.0-136-generic

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551:30311712
vspre833:30321513
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30322572
pythondataviewer:30285071
vscus158:30321503
pythonvsuse255:30340121
vscod805:30301674
pythonvspyt200:30340761
vscextlangct:30333562
binariesv615:30325510
vsccppwtct:30329789
pythonvssor306cf:30340756
bridge0708:30335490

@vscodebot
Copy link

vscodebot bot commented Jul 22, 2021

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@JacksonKearl JacksonKearl added bug Issue identified by VS Code Team member as probable bug search-editor labels Jul 30, 2021
@JacksonKearl JacksonKearl added this to the August 2021 milestone Jul 30, 2021
@JacksonKearl JacksonKearl added good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities labels Aug 2, 2021
@JacksonKearl
Copy link
Contributor

Accidentally already created a walkthrough of how to resolve this in #128661 so I'll post it here:

To reproduce, set the max results setting to some larger value, and run a search in the search editor which has more results than the value:
image
image

Access search editor with:
image

You can start by changing the limit passed here to read from the configurationService

Then, you should add a way for the search to be re run with no limit. See what happens in the search from the sidebar, whose code is here: https://github.com/microsoft/vscode/blob/1fc68f3cf274141942b424894645a4f7096ec1f1/src/vs/workbench/contrib/search/browser/searchView.ts#L0-L1 for how to make that change.

@vlwkaos
Copy link
Contributor

vlwkaos commented Aug 3, 2021

Hello, @JacksonKearl , I would like to work on this issue.

As-is: Search Editor has maxResults fixed to 10000
To-Be: Should use a maxResult value from configureationService and with no limit if value is null

Am I understading the issue correctly?

@JacksonKearl
Copy link
Contributor

@vlwkaos yes that is correct. Thanks!

@Nirajn2311
Copy link

Hey @vlwkaos, have you started working on this? If not, I'm interested on picking it up.

@vlwkaos
Copy link
Contributor

vlwkaos commented Aug 10, 2021

Hey @vlwkaos, have you started working on this? If not, I'm interested on picking it up.

@Nirajn2311 I've been busy so I have not done much, so you can pick it up. I realized it requires more time than I previously expected. As far as I see, making search editor to rerun the search results with polling like the search view requires some work...

@JacksonKearl
Copy link
Contributor

As far as I see, making search editor to rerun the search results with polling like the search view requires some work...

It is by design that the search editor does not stream results, this causes undesirable behavior in an editor context when you may be in the process of manipulating the results. For this ticket simply respecting the search.maxResults setting is sufficient.

@vlwkaos
Copy link
Contributor

vlwkaos commented Aug 11, 2021

As far as I see, making search editor to rerun the search results with polling like the search view requires some work...

It is by design that the search editor does not stream results, this causes undesirable behavior in an editor context when you may be in the process of manipulating the results. For this ticket simply respecting the search.maxResults setting is sufficient.

In that case, I have just done that, however, I still need to resolve what to do when the maxResult is null, because the editor will hang and crash. What would you suggest I do?

@Nirajn2311
Copy link

It's cool, I'll pick up another issue.

@alexr00 alexr00 added the verified Verification succeeded label Aug 26, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders search-editor verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@alexzhuaz @JacksonKearl @Nirajn2311 @alexr00 @vlwkaos and others