Open modersohn opened 2 years ago
This is a good idea way to got about it
It's actually getting quite complicated. First, because you can only call StateHasChanged() from the main/UI thread and second, because there's so much interdependency here.
Then, according to https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-6.0#synchronization-context Blazor enforces a single thread anyway it seems? Which makes me wonder how we could get overlapping calls to OnSetParametersAsync like seen in #87?
Since the whole issue is "nice to have" and it works as is, I'd leave it as is for now.
Alright thats fine we can put this on the back burner for now then.
@danielsolistensvik have you got any experience with this? Is Blazor still enforcing a single thread, like mentioned in the link above?
Worst example is probably the accounts page. So many things are loaded with the various services, and everything is loaded one after the other, i.e. slow. No wonder it takes 10-15 seconds for an account with lots of NFTs to actually finish loading.
There's is no reason for doing all of that synchronously - but some things have to be done first and that makes it a bit tricky.