tdlight-team / tdlight-telegram-bot-api

The TDLight Telegram Bot API is an actively enhanced fork of the original Bot API, featuring experimental user support, proxies, unlimited files size, and more.
https://t.me/TDLight
Boost Software License 1.0
120 stars 26 forks source link

optimize_memory minimum interval #38

Closed cavallium closed 3 years ago

cavallium commented 3 years ago

If a bot calls optimize_memory too frequently it should return without optimizing the memory again. A bot that calls optimize_memory too frequently can create a high CPU load. An hardcoded minimum limit of 4 minutes is fine, since allowing the change of this limit is quite useless.