- ABP Framework version: v8.3.2
- UI Type: Blazor WASM
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
Hello,
I am experiencing severe startup delays in the WASM application once the WASM assemblies are loaded in the browser.
One of the options we are considering with my colleagues to improve the startup performance of the application after downloading the WASM file is to avoid generating proxies at runtime. Since reflection is costly in WebAssembly, this would save computation time and potentially eliminate the request to the api-definition endpoint, which also introduces a delay.
Would it be possible to generate these proxies at compile time instead?
In a Blazor solution, would this be complex or resource-intensive? Is there any command available in the ABP suite to achieve this?
What would be the recommended steps to follow to enable this feature?
Thank you for your support.
6 Answer(s)
-
0
Hello Mariovh,
You can check our Static C# API Client Proxies document for this. https://abp.io/docs/latest/framework/api-development/static-csharp-clients
Also, if you are having performance issues, I can recommend you to switch to Blazor WebApp from Blazor WASM. See differences: https://medium.com/@meghnav274/blazor-server-vs-blazor-webassembly-vs-blazor-web-app-8fe8fc1cefeb
Here is the migrating document: https://abp.io/docs/9.0/release-info/migration-guides/abp-8-2-blazor-web-app
-
0
Hello, I created a solution using the command:
abp new Acme.BookStore -u blazor-webapp -m none --theme leptonx -csf
After making changes to BookStoreHttpApiClientModule to use static clients, I ran the command to generate the clients, but I got the following error in the CLI (as shown in the image).
-
0
-
0
-
0
It works correctly, but if I load the application on a page that injects an IApplicationService, when the render mode is Server, it says that it is not registered.
However, if I enter the application through the dashboard and, once the WASM is downloaded, I navigate to the page that has the IAppService, then in Client render mode, it works fine and correctly resolves the dependency injection.
-
0
Hi Mariovh,
It works correctly, but if I load the application on a page that injects an IApplicationService, when the render mode is Server, it says that it is not registered.
Your last question seems quite different from the initial one. Can you create a separate question for this topic?
Thank you for your understanding.