-
Notifications
You must be signed in to change notification settings - Fork 69
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
command that shows many results is extremely slow
#906
Comments
Search sorts the results (search.ml prioritize_search) so it can't output anything until it has seen the full result list |
I think Coq produces the results fast enough, it's getting them to VsCoq and the UI which slows things down. So Coq can keep sending the entire thing as one answer, it's just about how the IDE processes that answer. |
I think you are probably right and this could be fixed by something that @Durbatuluk1701 suggested here |
Oh yeah if this also affects |
The question I am asking myself is should this be a |
However I assume the line that you just executed if you are in manual mode should be blue until it is fully processed ? |
Absolutely. I only expected it to be shown in the proof view. I just observed that it is a diagnostic currently and that's likely part of the problem. |
No. It turns green pretty much immediately (after maybe 0.1s), and then it takes a few seconds until the results are shown. If it stayed blue until the proof view is updated, that would help to make this behavior less confusing. |
I guess that makes since. From the server point of view the command has been |
Should maybe it be the case that the highlight event is sent last? Might help with #859 as well I do not first look for Search results in the diagnostic annotation, but one workflow I have done (quite infrequently) is:
And look back at the search results with a hover, otherwise they disappear from the messages section of the goal panel when you have interpreted up to |
Ah, that's neat that this works! The other editors I used can't do this. Arguably this feature is also provided by the dedicated search panel, where results stick around even as you move on in the proof. Maybe there should be an easy way to turn a manually entered |
For teaching Coq, it is quite useful to first introduce commands like
Search
as things you type into the buffer, so that there's not yet another element of the UI that needs to be introduced -- and so that recommended commands can be included directly in the proof script, which is much easier than telling students "now press these shortcuts and enter this thing to run a search query".However, when a
Search
command produces hundreds of results, it can take 10s and more until there is any feedback in the UI. That's extremely confusing, and it is hard to even tell that something is processing in the background. It's also a lot slower than CoqIDE or ProofGeneral. I don't know why it is so slow; I think what happens is that every single search result is added as an "information" annotation (not sure what vscode calls them -- the things that cause blue underlines, as opposed to red for "error" and orange for "warning") to the current line and creating 1000 or so of these annotations takes a while -- and nothing at all is shown in the UI until they are all added.So maybe it'd be better to make this all just one single annotation instead of one per result -- or would that just explode vscode in other ways since the text associated with the annotation becomes too big? Or maybe it should just stop after 100 results or so and discard the rest (and indicate that things were discarded), since such a long list is rarely useful? But sometimes it's probably nice to get the entire list and Ctrl-F in it, I've definitely done that in ProofGeneral.
The text was updated successfully, but these errors were encountered: