You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After clicking the Export button, there's a 2-3 minute delay where the export dialog shows no progress and some controls remain active, creating a confusing user experience. The actual export completes quickly (~30s) after this delay, but users may think the application is frozen.
Current Behavior
User clicks Export button
Export button becomes disabled
Other dialog controls remain active/clickable for 2-3 minutes
No progress indicator visible during this time
After 2-3 minutes, progress bar appears and advances from 0-100% in ~30 seconds
Total time: ~4 minutes (vast improvement from 75 minutes!)
Root Cause
The delay occurs in ExportDialogViewModel.GetLoggingSessionFromId() (lines 189-210) which loads ALL data samples from the database into memory before the optimized export even begins. This happens in the background thread but provides no progress feedback.
// This loads millions of samples into memory, taking 2-3 minutesvarloggingSession=awaitcontext.Sessions.AsNoTracking().Where(s =>s.ID==sessionId).Select(s =>newLoggingSession{ID=s.ID,DataSamples=s.DataSamples.Select(d =>newDataSample{ ...}).ToList()}).FirstOrDefaultAsync();
Proposed Solution
Option 1: Quick UX Fix (Recommended for immediate improvement)
Disable ALL dialog controls immediately when Export is clicked
Show indeterminate progress or "Loading data..." message during the database query phase
Switch to percentage progress once actual export begins
Option 2: Full Optimization (Better long-term solution)
Remove the memory-loading step entirely
Pass only the session ID to OptimizedLoggingSessionExporter
Let the exporter stream directly from database (it already has this capability!)
This would eliminate the 2-3 minute delay completely
Implementation Details
Quick Fix Implementation:
[RelayCommand]privatevoidExportLoggingSessions(){IsExporting=true;IsDialogEnabled=false;// Disable all controlsExportProgressText="Loading session data...";// Show indeterminate progress during data load// Then switch to percentage during actual export}
Full Optimization Implementation:
The OptimizedLoggingSessionExporter already has database streaming capability via ExportFromDatabase(). We should:
Pass session ID instead of loaded data
Remove the unnecessary memory loading step
Report progress from the beginning
Benefits
Immediate user feedback after clicking Export
Clear indication that export is in progress
No confusion about whether application is frozen
Prevents accidental multiple export attempts
With Option 2: Further reduces export time by ~50% (eliminating the 2-3 minute load)
Acceptance Criteria
All dialog controls disabled immediately when Export clicked
Progress indication visible immediately (even if indeterminate)
User informed of current operation ("Loading data..." then "Exporting...")
No period where UI appears frozen or unresponsive
Consider implementing Option 2 to eliminate the loading delay entirely
Testing
Test with large datasets (50M+ samples) to ensure:
Summary
After clicking the Export button, there's a 2-3 minute delay where the export dialog shows no progress and some controls remain active, creating a confusing user experience. The actual export completes quickly (~30s) after this delay, but users may think the application is frozen.
Current Behavior
Root Cause
The delay occurs in
ExportDialogViewModel.GetLoggingSessionFromId()(lines 189-210) which loads ALL data samples from the database into memory before the optimized export even begins. This happens in the background thread but provides no progress feedback.Proposed Solution
Option 1: Quick UX Fix (Recommended for immediate improvement)
Option 2: Full Optimization (Better long-term solution)
OptimizedLoggingSessionExporterImplementation Details
Quick Fix Implementation:
Full Optimization Implementation:
The
OptimizedLoggingSessionExporteralready has database streaming capability viaExportFromDatabase(). We should:Benefits
Acceptance Criteria
Testing
Test with large datasets (50M+ samples) to ensure:
Related Issues
Recommendation
🤖 Generated with Claude Code