matrix-org / matrix-hookshot

A bridge between Matrix and multiple project management services, such as GitHub, GitLab and JIRA.
https://matrix-org.github.io/matrix-hookshot/
Apache License 2.0
283 stars 68 forks source link

Speedup startup by caching rooms with active connections #892

Open Half-Shot opened 7 months ago

Half-Shot commented 7 months ago

When we start up, we currently fetch all state across all rooms that we are joined to. This is ludicrously expensive, but reasonably safe to do. On large deployments this effectively means there is a noticeable gap between restarts. We can do some tinkering around the edges here by caching the rooms which are "active", and do fewer state requests as a result.