locked
Blazor Wasm Performance on CPU Intensive Calculations RRS feed

  • Question

  • User-343630552 posted

    I have a c# personal finance WinForms app that I have been trying to convert to Blazor Wasm.  A financial forecast is calculated each time the user changes a variable in their plan.  The calculations entail looping through a series of years and invoking in each iteration a number of methods in a set of 25-35 objects (depending on the user's forecast specs) that calculate the individual variables of the forecast.  Once started, the exact same calculation code runs in the WinForms and Blazor apps.  I am seeing a ~20 fold degradation in performance under Blazor (e.g. a complex forecast takes 350ms in WinForms and 7000ms in Blazor).  Does that level of degradation make sense?   Is a big part of it inherent to running within a browser?  Is Blazor Wasm a big part of it?   Are there any ways to significantly reduce it?  

    I am using VS Community 2019 v 16.8.2 to run AspNetCore 5.0 with Chrome 86.0.4240.198.

    Sunday, November 22, 2020 7:59 PM

Answers

  • User-821857111 posted

    I would be inclined to ask this question on Github: https://github.com/dotnet/aspnetcore/discussions. The Blazor development team are more likely to be able tell you whether you are hitting an area where they are trying to improve Blazor performance, or perhaps how to get improvements yourself.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 23, 2020 7:19 AM

All replies

  • User-821857111 posted

    I would be inclined to ask this question on Github: https://github.com/dotnet/aspnetcore/discussions. The Blazor development team are more likely to be able tell you whether you are hitting an area where they are trying to improve Blazor performance, or perhaps how to get improvements yourself.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 23, 2020 7:19 AM
  • User-343630552 posted

    Good tip, Mike.  Thanks.

    Monday, November 23, 2020 3:05 PM