mytonctrl
mytonctrl copied to clipboard
Feature/speed-up-archive-download 7x/8x
Pull Request Description
Changes Made
- Added
aria2for Downloading: The dump download method was switched from usingcurltoaria2c. This change allows for downloading the file using multiple connections (8 connections), which increases the download speed and reliability. - Updated apt Install Command: The
apt installcommand was modified to include thearia2package, which is necessary for the new download mechanism. The command now installsplzip,pv,aria2, andcurl. - Corrected Typo: Fixed a typo in the log message from "fuction" to "function".
Reason for Changes
- Improved Download Performance: By switching to
aria2c, the download process can now utilize multiple connections, improving the speed and reliability of fetching large files. This is especially beneficial for environments with limited bandwidth or unstable network connections. - Increased Flexibility: Including
aria2in the installation process ensures that all required packages are available for the new download method, enhancing the robustness of the script. - Code Readability and Accuracy: The typo fix improves the clarity of the debug logs, making them easier to understand for developers and maintainers.
Impact on Deployment
- Sizing: File is now downloaded in /tmp, instead of streaming.
Impact on the Codebase
- Performance: The download process will be faster and more efficient due to the parallel connections used by
aria2c. - Dependency Management: The additional dependency on
aria2increases the need for ensuring that this package is available in environments where the script runs. - Log Clarity: The corrected log message contributes to better debugging and log tracking.
Testing should confirm that the new download method works as expected in different network conditions, and that aria2 is successfully installed and used during the process.