Skip to content

PR feedback on syncing.#72996

Merged
CyrusNajmabadi merged 24 commits intodotnet:mainfrom
CyrusNajmabadi:syncCleanup
Apr 12, 2024
Merged

PR feedback on syncing.#72996
CyrusNajmabadi merged 24 commits intodotnet:mainfrom
CyrusNajmabadi:syncCleanup

Conversation

@CyrusNajmabadi
Copy link
Contributor

Followup to #72990.

@CyrusNajmabadi CyrusNajmabadi requested review from a team as code owners April 12, 2024 18:48
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 12, 2024
@CyrusNajmabadi CyrusNajmabadi requested a review from ToddGrun April 12, 2024 18:49
return new DocumentInfo(attributes, textLoader, documentServiceProvider: null);
}

public AssetHelper<T> GetAssetHelper<T>()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this pattern helped make the callsites work better with inference, by splitting the type args into the parts that have to be specified (the T) and the part that can be inferred (the TArgs).

@CyrusNajmabadi
Copy link
Contributor Author

@ToddGrun ptal.

@@ -152,6 +149,18 @@ public async Task<DocumentInfo> CreateDocumentInfoAsync(
// TODO: do we need version?
Copy link
Contributor

Choose a reason for hiding this comment

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

// TODO: do we need version?

TODO still in flux?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

want to talk to you in person about this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Might be a week or two before I'm back in the office due to that machine going down. I don't have any strong thoughts here, I just saw a todo and wondered if it was still valid.

@CyrusNajmabadi CyrusNajmabadi requested a review from ToddGrun April 12, 2024 20:46
cancellationToken).ConfigureAwait(false);

return builder.ToImmutableAndClear();
return builder.MoveToImmutable();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ToddGrun note the movetoimmutable here. the builder itself produces no internal garbage. it just holds onto the array and count. MoveToImmtuable is just an ownership transform of its array to the IA result. So the only thing left is the builder itself, which should be trivially collected.

Note: one pattern we could consider here is pooling these builders when we've successfully moved their internal arrays out.

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:

@CyrusNajmabadi
Copy link
Contributor Author

@jasonmalinowski For review when you get back.

@dibarbet dibarbet modified the milestones: Next, 17.11 P1 Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers 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.

4 participants