telegram
telegram copied to clipboard
Startup time can be significantly slow when a large number of Telegram puppets are configured
Related to #316
The bridge will await all connections to telegram on startup which means for a bridge handling several hundred connections, this can take minutes. Ideally, this would happen after startup in the background so as not to impact traffic. I'd probably suggest a model similar to the IRC bridge.
- The bridge should start a background task to connect all users on startup.
- The bridge does not await this task and starts up.
- When a Matrix user talks, that connection (if not connected), should be bumped in the queue to allow the message to be bridged (albeit delayed).
- Eventually all the connections will have completed, this may take some time because the bridge still needs to connect everyone to Telegram, but critically it shouldn't block the bridge handling chats.