-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Lazy load Blazor modules/assemblies #5543
Comments
Why delay |
ABP modules require to be initialized on application startup. They registers services to dependency injection for example. I didn't see in Microsoft's document how we register services to Dependency Injection (DI) for lazy loaded assemblies. As I know, it is not possible to register services to DI after the application has started. |
This should greatly improve this issue, right? |
I don't think so, to be honest. In any way, this milestone we are more focused on server side blazor (which will improve performance when you use), so we will try to work on it in the next milestones. |
As @hikalkan already mentioned. The main issue with lazy load is that we do a lot of things with DI. So no matter what we do, it will always load all of the modules at once. Since lazy-load is not an option I think the best way to do this would be to implement prerendering. But the current .Net5 prerendering has its own limitations. For example, when the app is loaded on the client it still needs to get the app state from the server and to re-render a second time. And when it does, it will do (ugly) a small flicker. There is a better way, but it is only available in new .Net6 so I think it is best to wait until it is released. |
we can do the following steps as a temporal solution : 1- add route component in the Blazor webAssembly client project to be the same as the one provided by default from ABP to use all features included App.razor
3- in this case we can make use of register additional assemblies using Abp configure service feature and also control lazy loading easily |
We should work on a general system to lazy load module assemblies.
Need to upgrade to .NET 5: https://docs.microsoft.com/en-us/aspnet/core/blazor/webassembly-lazy-load-assemblies
The text was updated successfully, but these errors were encountered: