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

Add a loading animation for file uploads #21

Open
isaachili opened this issue Nov 13, 2024 · 2 comments
Open

Add a loading animation for file uploads #21

isaachili opened this issue Nov 13, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@isaachili
Copy link
Owner

Large files may take some time to process and thus, it would be beneficial for the user to introduce a loading animation; otherwise, the user might think that the application has crashed.

@isaachili isaachili added the enhancement New feature or request label Nov 13, 2024
@isaachili isaachili self-assigned this Nov 13, 2024
@isaachili
Copy link
Owner Author

.NET 8 Blazor WASM does not support multi-threading:
dotnet/aspnetcore#54365
dotnet/aspnetcore#17730

@isaachili
Copy link
Owner Author

Attempted to use Task.Delay(TimeSpan.FromMilliseconds(1)) to yield back to the current context and thus, allowing the UI to update. The UI experienced no noticeable freezing; however, it significantly prolonged the process time.

A more conservative Task.Delay(TimeSpan.FromMicroseconds(100)) yields no benefits in terms of UI — the UI experienced frequent freezing.

Task.Yield() had no impact on UI performance either.


It could be worth looking into incorporating Web Workers with WASM to offload the work to a background thread.

@isaachili isaachili changed the title Add a loading for file uploads Add a loading animation for file uploads Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant