Release Date: 2025-01-25
Author: Takumi Mas
Key Features: Performance Improvements, Parallel Processing, Compression Support
🆕 New Features
1. Parallel File Retrieval
• Introduced parallel processing for file retrieval using goroutines.
• Added FileResult struct for efficient file result handling.
• Optimized Single Page Application (SPA) mode with parallel file fetching.
• Performance Improvements:
• Reduced response times for file retrieval.
• Enhanced error handling and fallback scenarios for SPA mode.
• Testing:
• Added test cases for parallel retrieval (TestGetFiles, TestParallelSPAHandling, TestFileResult).
2. Gzip Compression and Content-Length Support
• Implemented gzip compression for text-based files:
• Configurable compression level and minimum file size.
• Fully supports Accept-Encoding header.
• Prepared for future Brotli compression implementation.
• Added support for Content-Length header:
• Accurate file size detection using GCS metadata.
• Correct handling for both compressed and uncompressed responses.
• Configuration:
• EnableCompression flag to toggle compression.
• CompressionLevel and MinSizeForCompression for fine-tuning.
• Testing:
• Comprehensive test coverage for compression and Content-Length.
🚀 Performance Enhancements
1. Optimized Content-Type Detection
• Added efficient mappings for common file extensions.
• Improved fallback mechanisms for accurate Content-Type detection.
• Reduced dependency on GCS metadata lookups for better performance.
2. Improved SPA Routing
• Enhanced handling of root paths and index.html fallbacks.
• Fixed query parameter edge cases in file paths.
• Improved compatibility with SPA frameworks for seamless routing.
🧪 Testing and Quality Assurance
• Extensive test coverage for all new and enhanced features:
• TestGetFiles, TestParallelSPAHandling, and TestFileResult for parallel processing.
• Compression, SPA routing, and Content-Type detection tests for edge cases.
• Skipped GCS-dependent tests to ensure compatibility in CI environments.
⚙️ Breaking Changes
• None
This release delivers significant performance improvements, new features, and enhanced configuration flexibility for developers.
For detailed documentation on new settings and features, please refer to the updated project README.