Skip to content

Lots of join parts lead to bad room performance #9061

@freaktechnik

Description

@freaktechnik

Description

Rooms with primarily joins and parts and few actual messages seem to get extremely slow. So slow even, that Firefox warns about the site not responding sometimes.

Steps to reproduce

  • Go to room with lots of joins/parts
  • Wait for messages like "Ndtm left and rejoined, rapt0r (IRC) and 342 others joined and left, ePirat (IRC) and 14 others joined, TheSchaf (IRC) and 4 others joined and left 2 times" to be generated

I don't have an example of a public room with messages like that, but I'm sure there's some room in the federation with a similar issue.

I am sure it's related to joins/parts since the performance of the particular room has been getting worse the more there are. It feels like there is an O(n^2) implementation here of something that could probably be done in O(n) but that's just a guess without actually looking at all.

I'll happily test this more (like testing it on staging), provide specific details and possibly even contribute a patch for this.

Log: not sent

Version information

  • Platform: web
  • Browser: Firefox Nightly
  • OS: elementaryOS
  • URL: riot.im/app

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-PerformanceA-TimelineP2S-MajorSeverely degrades major functionality or product features, with no satisfactory workaroundT-Defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions