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

[wasm] Reduce amount of exception filtering in code reached from Blazor template #50281

Closed
radekdoulik opened this issue Mar 26, 2021 · 5 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono
Milestone

Comments

@radekdoulik
Copy link
Member

Exception filtering on wasm is slow, because we cannot unwind stack and thus need to switch from AOT to interpreter for parts of the code.

Try to reduce amount of exception filtering in parts of our libraries, which are used in Blazor template. In the linked assemblies we have currently 9 filter blocks:

Microsoft.Extensions.DependencyInjection.dll.dis.txt:      IL_0033:  endfilter
System.Net.Http.dll.dis.txt:      IL_0058:  endfilter
System.Private.CoreLib.dll.dis.txt:      IL_0048:  endfilter
System.Private.CoreLib.dll.dis.txt:      IL_0079:  endfilter
System.Private.CoreLib.dll.dis.txt:        IL_00e1:  endfilter
System.Private.CoreLib.dll.dis.txt:        IL_0042:  endfilter
System.Text.Json.dll.dis.txt:      IL_0148:  endfilter
System.Text.Json.dll.dis.txt:      IL_0183:  endfilter
System.Text.Json.dll.dis.txt:      IL_002e:  endfilter
@radekdoulik radekdoulik added the arch-wasm WebAssembly architecture label Mar 26, 2021
@radekdoulik radekdoulik added this to the Future milestone Mar 26, 2021
@radekdoulik radekdoulik self-assigned this Mar 26, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Mar 26, 2021
@ghost
Copy link

ghost commented Mar 26, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Exception filtering on wasm is slow, because we cannot unwind stack and thus need to switch from AOT to interpreter for parts of the code.

Try to reduce amount of exception filtering in parts of our libraries, which are used in Blazor template. In the linked assemblies we have currently 9 filter blocks:

Microsoft.Extensions.DependencyInjection.dll.dis.txt:      IL_0033:  endfilter
System.Net.Http.dll.dis.txt:      IL_0058:  endfilter
System.Private.CoreLib.dll.dis.txt:      IL_0048:  endfilter
System.Private.CoreLib.dll.dis.txt:      IL_0079:  endfilter
System.Private.CoreLib.dll.dis.txt:        IL_00e1:  endfilter
System.Private.CoreLib.dll.dis.txt:        IL_0042:  endfilter
System.Text.Json.dll.dis.txt:      IL_0148:  endfilter
System.Text.Json.dll.dis.txt:      IL_0183:  endfilter
System.Text.Json.dll.dis.txt:      IL_002e:  endfilter
Author: radekdoulik
Assignees: radekdoulik
Labels:

arch-wasm

Milestone: Future

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@lewing lewing added area-VM-meta-mono and removed untriaged New issue has not been triaged by the area owner labels Mar 26, 2021
@ghost
Copy link

ghost commented Mar 26, 2021

Tagging subscribers to this area: @CoffeeFlux
See info in area-owners.md if you want to be subscribed.

Issue Details

Exception filtering on wasm is slow, because we cannot unwind stack and thus need to switch from AOT to interpreter for parts of the code.

Try to reduce amount of exception filtering in parts of our libraries, which are used in Blazor template. In the linked assemblies we have currently 9 filter blocks:

Microsoft.Extensions.DependencyInjection.dll.dis.txt:      IL_0033:  endfilter
System.Net.Http.dll.dis.txt:      IL_0058:  endfilter
System.Private.CoreLib.dll.dis.txt:      IL_0048:  endfilter
System.Private.CoreLib.dll.dis.txt:      IL_0079:  endfilter
System.Private.CoreLib.dll.dis.txt:        IL_00e1:  endfilter
System.Private.CoreLib.dll.dis.txt:        IL_0042:  endfilter
System.Text.Json.dll.dis.txt:      IL_0148:  endfilter
System.Text.Json.dll.dis.txt:      IL_0183:  endfilter
System.Text.Json.dll.dis.txt:      IL_002e:  endfilter
Author: radekdoulik
Assignees: radekdoulik
Labels:

arch-wasm, area-Interop-mono, area-VM-meta-mono

Milestone: Future

@stephentoub
Copy link
Member

stephentoub commented Mar 26, 2021

This was discussed here:
#47197 (comment)
To quote @jkotas: "Undoing use of exception filters sounds like a step backward to me."

@ilonatommy
Copy link
Member

@radekdoulik, do we still plan to remove the filters in the light of @jkotas and @stephentoub arguments?

@lewing lewing closed this as completed Jun 15, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jul 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono
Projects
None yet
Development

No branches or pull requests

6 participants