Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Riot stalls when receiving messages #6060

Closed
turt2live opened this issue Jan 29, 2018 · 7 comments
Closed

Riot stalls when receiving messages #6060

turt2live opened this issue Jan 29, 2018 · 7 comments
Labels
A-Performance P1 S-Critical Prevents work, causes data loss and/or has no workaround T-Defect X-Regression
Milestone

Comments

@turt2live
Copy link
Member

Description

The few places I use riot.im/develop have become particularly bad to use as of today. I've taken a few profiles to hopefully help narrow down what is going on.

riot-slow-jan29-2018.zip (20mb compressed; 260mb uncompressed)

There's 3 profiles in the archive because chrome was getting mad at me. Here's their breakdown:

  1. Chrome watching the page load activity, up until it considers the page loaded. After this profile finished, the entire tab stalled on rendering (not uncommon).
  2. This is after I realized chrome stopped profiling and the tab was responsive again.
  3. A minute or so after the second profile ended, riot was becoming slow and having long pauses. This is a profile of just switching rooms and idling in a few places to try and see if anything in that area is causing the problem.

The only change that I'm aware of was matrix-org/matrix-js-sdk#594 landing. Riot was last "usable" (by a rough standard of not stalling every few seconds) Sunday, Jan 28, 2018.

Version information

  • Platform: web (in-browser)
  • Browser: Chrome 63
  • OS: Windows 10
  • URL: riot.im/develop
@turt2live
Copy link
Member Author

It's officially reached the point where I can only use Riot if I wish to type messages blind because it can't keep up with what I'm typing or clicking.

Here's a profile containing 1.7 minutes of frustration. In it, I check a couple rooms and try to send 2 messages in another room.

lots-of-pauses.zip (6mb compressed; 84mb uncompressed)

@turt2live
Copy link
Member Author

It looks like it's churning pretty badly on trying to figure out if badges should be displayed or not. The flame graph shows a few places where it takes several seconds to makeRoomTiles, in which it seems to call doesRoomHaveUnreadMessages a lot. This is also falling into the granular settings quite often in calling shouldHideEvent. All of this is kicked off by receiving events from the js-sdk.

@turt2live
Copy link
Member Author

For the most part this has gone away. Conveniently, my homeserver is also not trying to set itself on fire anymore. I have a feeling it's somewhat related.

@turt2live turt2live changed the title Develop is eating resources and becoming generally unresponsive Riot stalls when receiving messages Jan 30, 2018
@turt2live
Copy link
Member Author

... and I've narrowed it down to receiving messages causing an app-wide stall. Easily reproduced on my account by sending 3 or more messages in another client. The faster the messages come in, the longer riot pauses.

This correlates with the flame graph where it's trying to reorganize my massive room list.

@ara4n
Copy link
Member

ara4n commented Jan 30, 2018

This is making riot/develop completely unusable for me.
We've always stalled to reorder the RoomList when receiving messages (this prompted a bunch of my RoomList perf work back in April last year which subsequently got backed out).
However, something has changed about the RoomList reordering in the last few days which means that it's now horrifically slow - pauses of >30s whilst trying to type.

@ara4n ara4n added T-Defect A-Performance X-Regression S-Critical Prevents work, causes data loss and/or has no workaround P1 labels Jan 30, 2018
dbkr added a commit to matrix-org/matrix-react-sdk that referenced this issue Feb 6, 2018
Otherwise any function tghat takes longer than the delay to execute
will become eligible for execution again immediately after
finishing and therefore be able to spin.

This should help with element-hq/element-web#6060
(at least in the respect that it makes ratelimitedfunc do its job)
even if it's not the reason Riot started getting wedged.
@ara4n ara4n added this to the 0.14 milestone Feb 12, 2018
@lukebarnard1
Copy link
Contributor

lukebarnard1 commented Mar 16, 2018

My vote would be to close this following the recent perf work in matrix-org/matrix-react-sdk#1801 and #6313

@turt2live
Copy link
Member Author

Yea, I think the remaining performance issues are #6212 and #3307 now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Performance P1 S-Critical Prevents work, causes data loss and/or has no workaround T-Defect X-Regression
Projects
None yet
Development

No branches or pull requests

3 participants