7 months ago
Hello everyone,
I’m developing a Telegram bot with a simple purpose: to rename audio files. The bot’s setup includes Telethon for the Telegram API and Mutagen for modifying audio metadata. The process involves:
Receiving an audio file from the user (approximately 67.5 MB).
Downloading the file within the bot.
Modifying the file name using Mutagen.
Sending the renamed file back to the user.
During a test, the entire process took around 12 minutes. I’m trying to identify whether the delay is in the upload, download, or processing stages. Observed inbound speed varied between 3 and 10 Mbps during the download phase, but despite this, the process takes longer than expected.
Since I’m using the free tier of Railway, could this issue stem from potential network speed or processing restrictions? Or might the libraries and code structure be affecting performance?
Any advice on diagnosing or improving the speed for each step would be greatly appreciated. Additionally, if there's a way to more accurately measure inbound/outbound speeds within the code, that would be very helpful for troubleshooting.
Thank you!
0 Replies