-
Notifications
You must be signed in to change notification settings - Fork 48
Make server-side search respect Context Lines feature of Search Editor #1290
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
Make server-side search respect Context Lines feature of Search Editor #1290
Conversation
@gjsjohnmurray I think the CI keeps failing because we need to update |
@isc-bsaviano done, and CI now happy. |
Thanks for that @gjsjohnmurray. I gave this a try and while the code looks fine, I think it's performing much worse than before when there are many matches. I think that the issue is with your |
Good catch! I have pushed the fix. |
You fix is better, but I'm still seeing some slowness. The slowness occurs when I start with an empty search box (I'm using the regular search view, not the editor) and type a string to search. Using the current beta, the previous searches are cancelled very quickly when a new character is typed and the final search is shown quickly once typing is stopped. Using this dev vsix, the old searches are not being cancelled fast enough so there is lag when new characters are typed where the search results shown are for the older search. I'm not sure how this could be caused by your change since the context lines options will be |
As you say, it's not clear why the changes should have impacted performance noticeably for you. Anyway, I've pushed some changes that may improve things and I hope don't break anything. |
@gjsjohnmurray Once again, I really like your edit but the search still gets "stuck" on the previous query while you type. Maybe we can add more checks of |
@isc-bsaviano please re-test |
@gjsjohnmurray Just tested again and am seeing the same behavior. Here's two screen recordings, one with beta.3 and the other with your most recent dev.1290: beta3.movdev1290.mov |
What is the $ZV of the server you are connecting to? |
It's an internal kit. I tried again with a 2023.3 community edition kit and am seeing the same behavior. |
Interesting. I'm on an M1 Mac, which appears to be the only difference in our setup. |
And strange that your dev.1290 recording ends with "0 results in 1 file". |
Oh, that's because I cut the recording off a fraction of a second early. It eventually returned the correct results. Maybe that's showing up because context was sent before the match even though there shouldn't be any in this case. I don't see how that could happen from your code though. |
@gjsjohnmurray I copied your changes into one of my branches and in "Extension Development Host" mode everything looked fine. I'm going to approve this and assume that the issue is unique to me. If we see any complaints from the field we can take a closer look then. |
This PR fixes #1286