hn • r/hackernews
Comment on: Autoproto – minimal C++ MTProto client library stripped from TDLib
I built Telegram crawlers that need to monitor thousands of channels
simultaneously. TDLib works great for interactive clients, but when you
run it as a crawler it develops a memory problem: after a week or two of
watching 2000+ channels, it quietly fills up RAM and needs a restart.The root cause is that TDLib caches everything — messages, users, dialogs,
stickers, animations — because it was designed for a UI client that needs
instant access to recent history. MessagesManager, ContactsManager,
DialogsManager and ~150 other managers accumulate state indefinitely.
There's no eviction because a