Don’t trigger presence events on MUC presence
Specifically, previously, each MUC would be added as a roster item, and then each join presence would be counted as a resource of that item, triggering 1 to 5 events and more backend logic in slixmpp. As a result, joining big rooms is tremendously slow, (JID() calls, event() calls, __getitem__ calls for nothing), and takes RAM (a quick tracemalloc tells me around 1 MiB for 3500 participants, i.e. 2 big IRC rooms). Those resources may not necessarily be cleaned properly, leading to memory leaks on long-term usage. This is a micro-optimization that adds an attribute to roster items so that MUC room events can be ignored safely while not affecting common roster usage.
Showing with 5 additions and 0 deletions