Commit Graph

2 Commits

Author SHA1 Message Date
PSMinIO Developer 13091ea1b1 Fix upload performance bottleneck and enhance progress bar text
🚀 CRITICAL PERFORMANCE OPTIMIZATION:

 FIXED UPLOAD SLOWDOWN ISSUE:
  • Root cause: Progress reported on EVERY Read() call (thousands per chunk)
  • Added intelligent progress throttling in ProgressTrackingStream
  • Only report progress every 1% or 1MB (whichever is smaller)
  • Minimum 8KB threshold to prevent excessive updates
  • Massive reduction in progress callback overhead

 PERFORMANCE IMPROVEMENTS:
  • Before: Progress callback on every 4KB-64KB read = 1000+ calls per chunk
  • After: Progress callback every 1MB or 1% = ~64 calls per 64MB chunk
  • 15x-20x reduction in progress overhead
  • Maintains smooth progress bars without performance penalty

 ENHANCED PROGRESS BAR TEXT:
   Added 'Counter of Counter' format to chunk progress
   Before: 'Part 23: 32.1 MB/64.0 MB'
   After: 'Part 23 of 74 - 32.1 MB/64.0 MB'
   Better context for users about overall progress

 TECHNICAL IMPLEMENTATION:
   Added _reportingThreshold and _lastReportedBytes to ProgressTrackingStream
   Throttled progress reporting while maintaining accuracy
   Updated UploadPart method signature to include totalParts
   Preserved final progress report at 100% completion

 EXPECTED RESULTS:
   Fast, consistent upload speeds on high-bandwidth connections
   Smooth progress bars without performance degradation
   Better user experience with contextual progress information
   Scalable to large files without slowdown

Critical fix for multipart upload performance!
2025-07-14 22:50:50 -04:00
PSMinIO Developer 27c2aca2a9 Implement 3-layer progress tracking for multipart uploads
� 3-LAYER PROGRESS TRACKING:

 ENHANCED PROGRESS VISIBILITY:
  • Layer 1: Collection Progress - Overall multipart upload operation
  • Layer 2: File Progress - Current file being uploaded with parts
  • Layer 3: Chunk Progress - Individual chunk upload with streaming

� STREAMING IMPLEMENTATION:
  • Created ProgressTrackingStream for real-time chunk upload progress
  • Replaced ByteArrayContent with StreamContent for better memory usage
  • Maintains MD5 calculation for data integrity
  • Progress updates during actual data transfer

� PROGRESS HIERARCHY:
  • Collection Progress (ID: 1) - 'Multipart Upload Collection'
  • File Progress (ID: 2, Parent: 1) - 'File Upload' with speed/ETA
  • Chunk Progress (ID: 3, Parent: 2) - 'Uploading Chunk' with bytes transferred

 TECHNICAL IMPROVEMENTS:
  • Real-time progress during HTTP upload (not just after completion)
  • Proper parent-child progress relationship
  • Memory-efficient streaming approach
  • Maintains existing MD5 integrity checking
  • Compatible with parallel chunk uploads

� USER EXPERIENCE:
  • See overall multipart upload progress
  • Track current file upload with speed metrics
  • Watch individual chunks upload in real-time
  • Better visibility into long-running operations

Now multipart uploads show comprehensive 3-layer progress tracking!
2025-07-14 21:29:10 -04:00