reo7sp / tgbot-cpp

C++ library for Telegram bot API
http://reo7sp.github.io/tgbot-cpp
MIT License
995 stars 238 forks source link

about performance #247

Closed okman334 closed 1 year ago

okman334 commented 1 year ago

The library tgbot works in single thread blocking mode, so the performance is not so good. Especially when the tg group has many number. The command maybe also so many, the program is handle command slow. This is a bit sorry for C++, which is known for its performance😂 Do you have any suggestions if I want to run in a multi-threaded or multi-process environment?

BergHeisen commented 1 year ago

I'm not really proficient in C++ but I just use a thread pool and just assign every request to one the threads there. I don't really know if that solves the issue though

okman334 commented 1 year ago

I'm not really proficient in C++ but I just use a thread pool and just assign every request to one the threads there. I don't really know if that solves the issue though

that's a good idea.