-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Fix issue where FAR results were not getting sent until they were fully complete #73777
Conversation
var dehydrated = references.SelectAsArray( | ||
r => (SerializableSymbolGroup.Dehydrate(_solution, r.group, cancellationToken), | ||
SerializableSymbolAndProjectId.Dehydrate(_solution, r.symbol, cancellationToken), | ||
SerializableReferenceLocation.Dehydrate(r.location, cancellationToken))); |
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.
i'm not sure how i missed this. this is the server-oop sending point. When i switched this to IAsyncEnumerable, it meant that this was pulling on the entire stream, waiting for it to finish, before sending anything over to the client.
switched to the ImmutableArray auto-chunking form.
The semantics here are that as the server is sending this IA over, the ProducerConumser is still searching, and buffering up the results found after the last chunk was send to 'consumeItems'. After this call to the client finishes, we'll get another consumeItems call with that buffer's content. And that repeats until the producer is done.
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.
I've noticed a big lag on getting the initial reference the last couple days, just thought my machine was bugging out on me
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.
:'(
Have validated this fixes hte issue. |
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder.FindReferencesServerCallback.cs
Show resolved
Hide resolved
SerializableReferenceLocation.Dehydrate(location, cancellationToken))); | ||
} | ||
var dehydrated = references.SelectAsArray( | ||
r => (SerializableSymbolGroup.Dehydrate(_solution, r.group, cancellationToken), |
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.
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.
Just noticed that the ArrayBuilder SelectAsArray methods should be using a FixedSizeBuilder. I can do that tomorrow , but it's sadly going to require compiler reviews.
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.
oh, woof, FixedSizeArrayBuilder isn't defined at the compiler level. never mind.
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.
Accidentally regressed this with some refactorings in this area.