Open Closed

Bad ABP Blazor performance #1124


User avatar
0
BassaSolutions created
  • **ABP Framework version:**4.2.0
  • UI type: Blazor
  • DB provider: EF Core
  • **Tiered (MVC) **: yes

There are 2 main issues:

  • The startup is extremly slow
    • First call of the website (just test abp commercial startup template with blazor) needs 10-20 seconds.
    • When using a microsoft blazor client example, its 5 times faster
  • Responsiveness of UI elements of ABP blazor (e.g. abp table) is really bad.
    • e.g. When hovering over dropdowns it has ~500ms delay before it opens. Moving throw a page where things happen feels very slow.
    • When implementing our own blazor page within the abp application, without using abp blazor ui (only injected abp services), everything works without any delay, fast as expected.

My questions:

  • Are there known issues that lead to this bad performance?
  • Is this beeing worked on? Will the performance (of these 2 issues, but mainly the startup time!) improve in the future?
  • Is there anything that can be done now to improve it? (e.g. certain abp features that should not be used together with blazor?)

8 Answer(s)
  • User Avatar
    0
    mladen.macanovic created

    Hi, thanks for reaching us.

    The problem with Blazor WebAssembly being slow on startup is a known problem. Not just with ABP but with any other sligtly bigger app. The basic reason is that Blazor WebAssembly need to download all the CSS, JS and DLL files to the client in order to be able to start up. In the default Blazor template this is maybe not that obviuos because it doesn't have as near as many features that any regular application need to have. Not to mention you will soon or later add some third-party NuGets and with that increase the app size.

    The same problem is with our ABP Blazor. Since everything is a module and they all depends on many diferent modules, they all must be loaded at once to be able to start the application. That is main reason for slowness. We are constantly trying to find a ways to improve it but for now this is the only way. The good news is that we have just added support for Blazor server-side and it is much faster to load and to use. It is on par with regular MVC app. In my opinion it is much stable at this time and you should maybe switch to it instead of using BWA.

  • User Avatar
    0
    BassaSolutions created

    I could not find any documentation to blazor server on the abp docs, there is just a description of a blazor client setup. Is it already in version 4.2.2? I'd be glad if you can point me to some documentation.

    Thanks!

  • User Avatar
    0
    BassaSolutions created

    Ok, so there is no documentation, but in the latest preview there is the option to get blazor side server application... But I am pretty sure the result is broken. There is no Host project that can be started.

    We would like to migrate as soon as possible, because waiting 20 seconds for a page is not ok to offer to any user.

  • User Avatar
    0
    AndrewT created

    What is required and the effort to migrate a blazor app from WASM back to a server side app? We are also finding the performance incredibly bad. Also WASM is single threaded so we expect issues with trying to run parallel processes, eg Audio and UI.

  • User Avatar
    0
    mladen.macanovic created

    Hi,

    The migration guide for 4.x to 4.3 can be found here: https://docs.abp.io/en/abp/4.3/Migration-Guides/Abp-4_3

  • User Avatar
    0
    AndrewT created

    @mladen.macanovic we had already upgraded to v4.3-RC WASM. What is required to go from 4.3 WASM to 4.3 Server?

    @BassaSolutions - could you update later on your experience with 4.3 Server?

    The performance is so bad we also feel stuck and are unsure about continuing the migration of other apps from aspnetzero.

  • User Avatar
    0
    mladen.macanovic created

    For moving your project from Blazor WebAssembly to Blazor Server the best way is to first create a new ABP Blazor Server project

    Look at some of the guides here https://docs.abp.io/en/abp/4.3/Getting-Started?UI=BlazorServer&DB=EF&Tiered=No

    After the project is created you will need to compare the diferences and update your project accordingly. The process should be similar to any Blazor WA to Blazor SS conversion. There is no easy way around it but we tried to keep the structure as close as possible between the projects.

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09