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

Fix issue where FAR results were not getting sent until they were fully complete #73777

Merged
merged 2 commits into from
May 30, 2024

Conversation

CyrusNajmabadi
Copy link
Member

Accidentally regressed this with some refactorings in this area.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels May 29, 2024
var dehydrated = references.SelectAsArray(
r => (SerializableSymbolGroup.Dehydrate(_solution, r.group, cancellationToken),
SerializableSymbolAndProjectId.Dehydrate(_solution, r.symbol, cancellationToken),
SerializableReferenceLocation.Dehydrate(r.location, cancellationToken)));
Copy link
Member Author

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.

Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:'(

@CyrusNajmabadi
Copy link
Member Author

Have validated this fixes hte issue.

@CyrusNajmabadi CyrusNajmabadi marked this pull request as ready for review May 30, 2024 01:22
@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner May 30, 2024 01:22
SerializableReferenceLocation.Dehydrate(location, cancellationToken)));
}
var dehydrated = references.SelectAsArray(
r => (SerializableSymbolGroup.Dehydrate(_solution, r.group, cancellationToken),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r

make static?

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants