I am working on a bot that should set a reaction to a message in certain telegram groups as soon as it appears. It is important that user bot is the first to set a reaction How can I rewrite the bot so that the time spent is shorter (30-40ms) and more stable? Using telethon and pyrogram, I realized that there is not enough performance to set a reaction, it takes from 55 to 150 milliseconds. Competitors have a much more stable value and in most cases, they are the first to set a reaction I have tried everything, everything is already asynchronous, there is a semaphore and other goodies, but this does not affect performance Continue reading...