Skip to content
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

Can abp Blazor be this fast? #13114

Open
sturlath opened this issue Jun 26, 2022 · 24 comments
Open

Can abp Blazor be this fast? #13114

sturlath opened this issue Jun 26, 2022 · 24 comments
Assignees
Milestone

Comments

@sturlath
Copy link
Contributor

Steves Sanderson Blazor WASM is.. well.. Blazor fast.. can abp.io get this fast please 695423!

Sorry but abo.io’s Blazor is super slow..

@hikalkan
Copy link
Member

ABP.IO has not its own Blazor. We are using the same one. Just adding some more libraries, adding authorization and some other real business requirements. Blazor is getting slow when we add these.

ABP's Angular UI, for example, is super fast. Try https://commercial-demo.abp.io/ for example, which is a large application.
ABP's Angular UI is using the same backend with the Blazor UI, which is also built with ABP.

I noted that. If I have time I will add ABP to this example to see how ABP is making it slower.

@sturlath
Copy link
Contributor Author

Yes sorry for this "outburst" of mine 😅 and I know yours is not special version. To note I´m happy with everything abp.io but loading of my Blazor backend is terribly slow (by any standard) what ever I have tried.

So when you see something like this you wonder why mine is taking such a long time.

Then you see that he is using "It’s a combination of static pre-rendering and max trimming settings" and this BlazorWasmPreRendering nuget

I have looked at lists like this Blazor performance best practices and they don´t mention this package for instance.

But now that we can see that WASM can be Blazing fast so why not default file new from abp.io? Can something be done or is the framework just to heavy (doing much more than Steves version)?

@hikalkan
Copy link
Member

OK, we will test and work on these. Thanks.

@omer-repo
Copy link
Contributor

Actually, it is wonderful developing Blazor with ABP framework. It makes developing so easy to communicate UI with backend. I see only loading time problem even after caching assemblies.

Loading after caching

I tried to understand why Blazor is slow on loading. There are nearly 5-6 seconds gap between requests from backend. I am not sure it is related to backend side. So I imported source projects of ABP from github (v5.2.2 and v5.3.1) and checked loading times.
I couldn't find what triggers openid-configuration so I investigated "application-configuration" request. Even it takes only 90ms to download it from backend it takes 2 seconds to complete initializing module "WebAssemblyCachedApplicationConfigurationClient"

Loading after caching
image
image
image

I checked also InitializeAsync of "WebAssemblyCachedApplicationConfigurationClient", it takes 2 seconds
var configurationDto = await ApplicationConfigurationAppService.GetAsync();

As I understand from browser and log files, fetching data from backend is so fast, but processing it in Blazor side is slow. It goes to AbpApplicationConfigurationClientProxy but I couldn't investigate more because I need to import other projects to understand what happens there.

I hope there is not a big issue while initializing modules of Blazor and it can be solved soon.

@maliming
Copy link
Member

maliming commented Jul 5, 2022

Thanks @omer-repo I will check it.

@sturlath
Copy link
Contributor Author

sturlath commented Aug 17, 2022

Hi we have figured that most of our problems is related to Blazor compressed dll´s not served to the browser (they get created) so we are trying to add autostart="false" to <script src="_framework/blazor.webassembly.js" ></script> that I think you are adding in BundlingService.cs

Here is a quick video about it.

I created a support ticked for this issue. Shouldn´t the compression be default in the template?

@maliming
Copy link
Member

Thanks @sturlath 👍

@sturlath
Copy link
Contributor Author

We are having problems overriding/removing-and-re-adding the script tag.

Just asking here in case this is something that is not currently possible but could then be introduced into version 6.0? (I can´t go live with users downloading over 100 MB website can I?)

@realLiangshiwei
Copy link
Member

I will check it

@sturlath
Copy link
Contributor Author

@realLiangshiwei did you by any change have time checking this out?

Being able to override this would be great but next best would be to only have to wait for abp 6.0 and not 7.0 (thats the reason for my pestering sorry)

@realLiangshiwei
Copy link
Member

@realLiangshiwei did you by any change have time checking this out?

Being able to override this would be great but next best would be to only have to wait for abp 6.0 and not 7.0 (thats the reason for my pestering sorry)

See: #13771

@omer-repo
Copy link
Contributor

Thanks @omer-repo I will check it.

Hi @maliming , could you get a look the delay issue on loading

@maliming
Copy link
Member

hi
We will check this asap. Thanks

@sturlath
Copy link
Contributor Author

@realLiangshiwei Im not sure this is fixed in 6.0 #13771

When we try to load up a Blazor WASM its still taking long time (and MB’s) to dowload. Are there any other steps to do?

An why isn’t this a default functionality in the file new project template? Who would ever want to serve 100 MB page?

@sturlath
Copy link
Contributor Author

@realLiangshiwei any feedback on this? Did you manage to try this out yourself and get the download size down?

Are we really doomed to be stuck with 100 MB Blazor backends? Is anybody using it out there?

If I wasn´t so deep into my development I would move from abp.io's version of Blazor but I can´t so I can only ask you to figure this out for us poor souls that choose it to begin with!

So, all feedback appreciated on this one1

@hikalkan hikalkan modified the milestones: 7.0-preview, backlog Nov 2, 2022
@hikalkan
Copy link
Member

hikalkan commented Nov 2, 2022

I removed this from 7.0-preview milestone. It doesn't mean we don't actively tracking it. However, this is not a concrete development that we will complete in a certain date range.

@realLiangshiwei
Copy link
Member

@sturlath
Copy link
Contributor Author

How about this performance increase from Blazorise that abp.io is missing, @hikalkan? Something we can push into 7.0?

@realLiangshiwei
Copy link
Member

Hi, @sturlath

See: #14734

@sturlath
Copy link
Contributor Author

sturlath commented Nov 19, 2022

Thanks @realLiangshiwei yes, I spotted this and asked this question.

@sturlath
Copy link
Contributor Author

I saw this comment I don´t know if this is something that can be used in abp.io but can hopefully close these loading gaps

You can essentially put all of these inside a link header with preload to speed things up.

@sturlath
Copy link
Contributor Author

sturlath commented Dec 7, 2022

We are now serving our Blazor WASM with static websites and CDN í Azure and that combined with Brotli compression is making huge difference.

But I just wanted to add to @omer-repo about the "timeouts" in the loads.

We can see 5+3 sec in loading where nothing seems to be happening and was wondering what is going on there and if there is any work going on getting that down?

image

@sturlath
Copy link
Contributor Author

Its not only us wondering about these things https://support.abp.io/QA/Questions/4210/Blazor-WASM-on-Azure-App---awful-loading-times

Can somebody tell us if this is being looked at? And if you have, the results? Is it fixable or will the abp wasm never be usable?

And then if you havent looked at it, why?

@dongfo
Copy link

dongfo commented Jan 3, 2024

anyone working on it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants