Repository navigation
Migrate to .NET 10 async ZIP APIs and improve import/export UX - #74
danielchalmers with Copilot wants to merge 4 commits into
Conversation
Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
|
@copilot There's still a significant amount of UI blocking and lag during import/export. Is there anything else we can do? We should also have a warning during import to not close the app while import is in progress. |
Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
I've made several improvements to reduce UI blocking and add the import warning: Changes in commit
These changes use the new .NET 10 async ZIP APIs more effectively and ensure operations don't block the UI thread. The combination of |
|
Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
I've addressed all three points in commit
|
.NET 10 introduces async methods for ZIP operations (
ZipArchive.CreateAsync,ZipArchiveEntry.OpenAsync) that enable non-blocking I/O for archive manipulation. This PR migrates to these new APIs and adds performance improvements to reduce UI blocking during import/export operations.Changes
BackupFile.cs: Migrated synchronous ZIP operations to async equivalentsnew ZipArchive()→await ZipArchive.CreateAsync()entry.Open()→await entry.OpenAsync()usingtoawait usingCancellationTokenparameter support to all async methods.ConfigureAwait(false)to all async calls to prevent UI thread blockingAppDataService.cs: Performance improvements for database operationsCancellationTokenparameter support to all async methods.ConfigureAwait(false)to all async calls to prevent UI thread blockingAppDataUIService.cs: Improved user experience during import/export.ConfigureAwait(false)to async callsSettingsPage.razor: Enhanced loading screen UXImportExportTests.cs: Updated test fixtures to use async ZIP APIsBenefits
ConfigureAwait(false)prevents async continuations from blocking the UI thread during import/export operationsCancellationTokenparameters allow operations to be cancelled if neededExample
Before:
After:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.