|
Hi, guys! P.S. I compared a release build of the bot |
Replies: 3 comments
|
I did some testing and after replacing boost::property_tree with rapidjson the bot actually became slower. Another possible reason for this is the use of pointers almost in every object |
It looks like you’re measuring time with network. Network time is volatile, so it’s not so proper comparison. But if you want to continue research, there’s a way to compare - make a lot of measurements of time and calculate percentiles (for example 95th). Percentiles help overcome volatile nature of network time. Refactor from boost to rapidjson won’t give much nor performance improvement, nor degradation, because json parsing time is nanosecond scale while network time is microsecond scale |
|
The measured 77-280 ms includes DNS/TCP/TLS, network routing, Telegram processing and the response transfer, so it does not isolate language or JSON performance. Current For a meaningful comparison:
If the difference remains, include the benchmark code, sample count, percentiles and whether both clients reuse a connection. The original timings alone do not demonstrate a tgbot-cpp defect. |
The measured 77-280 ms includes DNS/TCP/TLS, network routing, Telegram processing and the response transfer, so it does not isolate language or JSON performance. Current
CurlHttpClientkeeps one libcurl handle per thread, which allows connection reuse on repeated requests from the same thread.For a meaningful comparison:
If the difference remains, include the benchmark code, sam…