Oliver
Optimizing Large i18n Loading in Blazor
Hello everyone,
I am currently experiencing some performance issues during application startup.
We are using Blazor Wasm and we are loading a large json file with a lot of language keys (about 4.5MB) during startup. The result is obviously a freezing UI while the language keys are loaded (about 2-10 sec depending on the device performance). We have already tried to use local storage as a cache layer, but serialisation still needs to be done.
How do you deal with such a case? I think I am not the only one with a lot of language keys.
14 replies
✅ Winform with Blazor -> HotReload Slow
We've now started migrating our project to .NET 9, and we're experiencing issues with hot reload. Here's our setup:
We have a Windows Forms application that serves as a host.
The host contains a single Blazor WebView component which runs our main application.
When making simple changes (like adjusting a div's margin (.razor file) or changing something in a cs file (non blazor)), it takes approximately 30 seconds for the hot reload to apply.
In the dotnet watch console window, we're seeing warnings and two file change notifications for each single change.
Additionally, we're noticing that temporary files (marked with a ~ at the end) created by Rider IDE are being included in these changes.
Can anyone explain why we're experiencing these slow reload times and multiple file change detections?
dotnet watch ⌚ File added: C:\Users\Me\source\XXX\Common\XXX.Ui.Base\Components\Data\DetailPageContainer.razor~
dotnet watch ⌚ File updated: C:\Users\Me\source\XXX\Common\XXX.Ui.Base\Components\Data\DetailPageContainer.razor
dotnet watch ⌚ File added: C:\Users\Me\source\XXX\Common\XXX.Ui.Base\Components\Data\DetailPageContainer.razor~
dotnet watch ⌚ File updated: C:\Users\Me\source\XXX\Common\XXX.Ui.Base\Components\Data\DetailPageContainer.razor
dotnet watch ⚠ [XXX (net9.0-windows)] Type 'System.Windows.Forms.WinFormsMetadataUpdateHandler' has method 'Void UpdateApplication()' that does not match the required signature.
dotnet watch ⚠ [XXX (net9.0-windows)] Expected to find a static method 'ClearCache' or 'UpdateApplication' on type 'System.Windows.Forms.WinFormsMetadataUpdateHandler, System.Windows.Forms' but neither exists.
dotnet watch ⚠ [XXX (net9.0-windows)] Expected to find a static method 'ClearCache' or 'UpdateApplication' on type 'Microsoft.AspNetCore.Components.WebView.StaticContentHotReloadManager, Microsoft.AspNetCore.Components.WebView.WindowsForms' but neither exists.
dotnet watch 🔥 [XXX (net9.0-windows)] Hot reload succeeded.
6 replies