From a837ea9fe16517611a3cc358131dff19a3104df3 Mon Sep 17 00:00:00 2001 From: Manos Date: Thu, 5 Feb 2026 02:26:13 +0200 Subject: [PATCH] v4.1.0 - Memory optimization, Buy Me a Coffee button, and updated mobile Protocol.cs --- CHANGELOG.md | 90 + README.md | 14 +- client/MainWindow.xaml | 1163 +++++++++ client/MainWindow.xaml.cs | 3527 ++++++++++++++++++++++++++ mobile/App.xaml | 14 + mobile/App.xaml.cs | 11 + mobile/AppShell.xaml | 14 + mobile/AppShell.xaml.cs | 9 + mobile/MainPage.xaml | 98 + mobile/MainPage.xaml.cs | 571 +++++ mobile/MauiProgram.cs | 18 + mobile/PS5UploadMobile.csproj | 47 + mobile/Services/FtpService.cs | 270 ++ mobile/Services/PS5UploadService.cs | 241 ++ mobile/Services/Protocol.cs | 1002 ++++++++ release/v4.1.0/PS5UploadMobile.apk | Bin 0 -> 30851885 bytes release/v4.1.0/README.md | 343 +++ release/v4.1.0/ps5_upload_server.elf | Bin 0 -> 155384 bytes 18 files changed, 7425 insertions(+), 7 deletions(-) create mode 100644 client/MainWindow.xaml create mode 100644 client/MainWindow.xaml.cs create mode 100644 mobile/App.xaml create mode 100644 mobile/App.xaml.cs create mode 100644 mobile/AppShell.xaml create mode 100644 mobile/AppShell.xaml.cs create mode 100644 mobile/MainPage.xaml create mode 100644 mobile/MainPage.xaml.cs create mode 100644 mobile/MauiProgram.cs create mode 100644 mobile/PS5UploadMobile.csproj create mode 100644 mobile/Services/FtpService.cs create mode 100644 mobile/Services/PS5UploadService.cs create mode 100644 mobile/Services/Protocol.cs create mode 100644 release/v4.1.0/PS5UploadMobile.apk create mode 100644 release/v4.1.0/README.md create mode 100644 release/v4.1.0/ps5_upload_server.elf diff --git a/CHANGELOG.md b/CHANGELOG.md index 54cb2b9..7827871 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,95 @@ # Changelog - PS5 Upload Suite +## Version 4.1.0 - Memory Optimization & Large File Handling (February 5, 2026) + +### ๐Ÿง  Memory & Performance Improvements + +#### 1. Large File Count Support (156K+ Files) +- **Fixed crash** with games containing 156,253+ files (e.g., Astrobot) +- **Removed massive dictionary** - No longer creates 156K FileInfo objects at once +- **Incremental calculation** - Total bytes calculated progressively during scan +- **Memory efficient** - Handles unlimited file counts without OutOfMemoryException + +#### 2. Lock-Free Progress Tracking +- **ConcurrentDictionary** - Replaced Dictionary with thread-safe collections +- **Zero lock contention** - Eliminated `lock (_progressLock)` blocks +- **Atomic operations** - Uses `Interlocked.Add()` for progress updates +- **Smooth UI** - No stuttering from lock contention + +#### 3. Auto Memory Cleanup +- **Completed files removed** - Dictionaries cleaned after file completion +- **Reduced memory footprint** - Only active uploads tracked +- **Prevents memory overflow** - Long-running uploads stay stable + +#### 4. Reduced UI Stuttering +- **Batch logging** - Small files logged every 50 completions (up from 25) +- **Less UI pressure** - Fewer `Dispatcher.Invoke()` calls +- **Smoother experience** - Especially noticeable with 100K+ files + +### ๐Ÿ”ง Technical Changes +- Changed `_fileProgressBytes` from Dictionary to ConcurrentDictionary +- Changed `_fileChunkProgressBytes` from Dictionary to ConcurrentDictionary +- Changed `_chunkLogLastBytes` from Dictionary to ConcurrentDictionary +- Removed `fileSizeLookup` dictionary creation (caused OutOfMemoryException) +- Increased `SmallFileLogBatchSize` from 25 to 50 +- Added dictionary cleanup in file completion handlers + +### ๐Ÿ› Bug Fixes +- Fixed application crash when uploading games with 156K+ files +- Fixed UI stuttering during small file uploads +- Fixed memory overflow from massive dictionary allocations +- Fixed lock contention causing UI freezes + +### ๐Ÿ“Š Tested With +- **Astrobot**: 156,253 files, 1,724 directories +- **Result**: Zero crashes, smooth upload, stable memory usage + +--- + +## Version 4.0.0 - Retry Feature & Stability Improvements (January 27, 2026) + +### โœจ New Features + +#### ๐Ÿ”„ Retry Failed Transfers +- **Right-click context menu** on failed transfers +- **Retry Upload** - Re-queue failed files for upload +- **Remove from List** - Clear individual failed items +- **Persistent paths** - Failed transfers store local and remote paths +- **Smart retry** - Validates file existence before retry + +#### ๐Ÿ—‘๏ธ Clear All Button Fix +- **Transfer History Clear All** now works correctly +- **Confirmation dialog** before clearing history +- **Clears both** completed and failed transfers + +### ๐Ÿ”ง Performance & Stability + +#### Connection Stability +- **Reverted 16MB buffer** - Caused connection drops with 16 parallel connections +- **Stable 8MB buffer** - Proven reliable for high-speed transfers +- **TCP NoDelay** - Already enabled for optimal performance +- **16MB socket buffers** - Maintained for maximum throughput + +#### Upload Performance +- **Large files (>100MB)**: 30-36 MB/s per file +- **Small files (<100MB)**: 8-12 MB/s per file +- **4 parallel large files** - Prevents PS5 memory exhaustion +- **16 total connections** - Optimal for mixed workloads + +### ๐Ÿ› Bug Fixes +- Fixed Clear All button not clearing transfer history +- Fixed connection drops when using oversized buffers +- Added proper event handlers for failed transfer context menu +- Improved error handling for retry operations + +### ๐Ÿ“ Code Quality +- Added comprehensive inline documentation +- Improved code organization and readability +- Better error messages for failed operations +- Enhanced UI feedback for user actions + +--- + ## Version 3.3.0 - Smart Search & Enhanced Mobile (January 26, 2026) ### ๐Ÿ” Smart Search Feature diff --git a/README.md b/README.md index 78d437b..f15a8a1 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,16 @@ **By Manos** -**Version 3.3.0 - Smart Search & Enhanced Mobile** +**Version 4.1.0 - Memory Optimization & Large File Handling** Custom high-speed file transfer system for PS5 with etaHEN. Achieves **104+ MB/s** upload speeds for large files using parallel chunked uploads! -โญ **NEW in v3.3.0:** -- ๐Ÿ” **Smart Search** - Full filesystem indexing with instant search (wildcards, size filters) -- ๐Ÿ’ป **Shell Terminal** - Execute commands directly on PS5 with real-time output -- ๐Ÿ“ฑ **Mobile Search** - Search feature now available on Android app -- ๐Ÿš€ **Navigate from Search** - Double-click search results to jump to folder -- โšก **Lightning Fast** - Search 200,000+ files instantly +โญ **NEW in v4.1.0:** +- ๐Ÿง  **Memory Optimization** - Handles 156K+ files without crashes +- โšก **Reduced UI Stuttering** - Batch logging for smoother experience +- ๐Ÿ”ง **Lock-Free Operations** - ConcurrentDictionary for thread-safety +- ๐Ÿงน **Auto Memory Cleanup** - Completed files removed from tracking +- ๏ฟฝ **Incremental Processing** - No massive dictionary allocations ๐Ÿ“ฑ **Android Mobile Client available!** diff --git a/client/MainWindow.xaml b/client/MainWindow.xaml new file mode 100644 index 0000000..1c744c2 --- /dev/null +++ b/client/MainWindow.xaml @@ -0,0 +1,1163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +