Skip to content

Blazor WebAssembly: Rfc2898DeriveBytes.GetBytes() takes 40+ times longer than same code in WPF app. #21888

@LeeActon

Description

@LeeActon

Describe the bug

I have been porting a WPF app to Blazor WebAssembly, and found that Rfc2898DeriveBytes.GetBytes() takes over 40 times longer in WebAssembly as in WPF.
This makes my app unusable.

To Reproduce

Compile the code in the sample app (see github reference below).
Run the WebAssembly app, and Click the "Click me" button. It will display how much time it took.
Then Run the WPF app and do the same thing.
On my machine the WebAssembly version takes around 3.8 to 4.5 seconds whereas the WPF app takes only 0.1 seconds. That's 38 to 45 times longer for WebAssembly.

Further technical details

See the code for full details.

https://github.com/LeeActon/BlazorAppBug

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor Componentsfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyquestion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions