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

Update JSCallResultTypeHelper.cs #25628

Merged

Conversation

MackinnonBuck
Copy link
Member

@MackinnonBuck MackinnonBuck commented Sep 4, 2020

Description

Currently, each .NET->JavaScript interop call results in JSCallResultTypeHelper.FromGeneric<TResult>() comparing TResult with up to three IJSObjectReference types. We can optimize this slightly for the general case by first checking if typeof(TResult).Assembly matches the assembly containing JSCallResultType before performing the other checks.

Customer Impact

Customers may see a slight performance improvement for JS interop calls.

Regression?

No.

Risk

Very small risk. This is a small change and existing tests cover this area.

Addresses #25624

@MackinnonBuck MackinnonBuck added the area-blazor Includes: Blazor, Razor Components label Sep 4, 2020
@MackinnonBuck MackinnonBuck changed the title Update JSCallResultTypeHelper.cs and PublicAPI.Unshipped.txt Update JSCallResultTypeHelper.cs Sep 4, 2020
dougbu
dougbu previously approved these changes Sep 4, 2020
Copy link
Member

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

This PR fixes a build break. We need it in ASAP

@halter73
Copy link
Member

halter73 commented Sep 4, 2020

@dougbu There's also #25629 that just fixes the build break.

@dougbu
Copy link
Member

dougbu commented Sep 4, 2020

@Pilchie should I proactively merge this to unbreak the build, letting @SteveSandersonMS and @MackinnonBuck follow up on the C# change if there's something wrong there❔

@halter73
Copy link
Member

halter73 commented Sep 4, 2020

@Pilchie There's also #25629 that just fixes the build with the C# change.

@dougbu
Copy link
Member

dougbu commented Sep 4, 2020

Never mind this PR @Pilchie except for its ask mode aspect. I merged #25629 because that "just" unbreaks the build. Many thanks @MackinnonBuck

@halter73
Copy link
Member

halter73 commented Sep 4, 2020

Can this be tested?

@MackinnonBuck MackinnonBuck requested a review from a team as a code owner September 4, 2020 20:21
@Pilchie
Copy link
Member

Pilchie commented Sep 4, 2020

@MackinnonBuck please ping when CI is green and this is signed off. Dismissing @dougbu's signoff since I presume it was based on just the build fix.

@Pilchie Pilchie requested a review from dougbu September 4, 2020 20:47
@MackinnonBuck MackinnonBuck dismissed dougbu’s stale review September 8, 2020 18:38

The initial review was to pull in the build fix (which has been resolved), not the C# change.

Copy link
Member

@SteveSandersonMS SteveSandersonMS left a comment

Choose a reason for hiding this comment

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

Great!

@mkArtakMSFT mkArtakMSFT added the Servicing-consider Shiproom approval is required for the issue label Sep 9, 2020
@ghost
Copy link

ghost commented Sep 9, 2020

Hello human! Please make sure you've included the Shiproom Template in a comment or (preferably) the PR description. Also, make sure this PR is not marked as a draft and is ready-to-merge.

@Pilchie Pilchie added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Sep 9, 2020
@Pilchie
Copy link
Member

Pilchie commented Sep 9, 2020

Approved for .NET 5.0 RC2.

@mkArtakMSFT mkArtakMSFT merged commit 8f46188 into release/5.0-rc2 Sep 9, 2020
@mkArtakMSFT mkArtakMSFT deleted the t-mabuc/js-call-result-type-improvement branch September 9, 2020 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants