element-android icon indicating copy to clipboard operation
element-android copied to clipboard

Switching spaces is slow

Open robintown opened this issue 4 years ago • 12 comments

Describe the bug

On my modestly sized account with ~8 spaces containing ~10 rooms each, switching spaces is generally slow. It often takes 1 to 2 seconds from the moment when I tap on a space in the side panel, to when I actually see the room list populated with that space's rooms. The performance of this common interaction could be improved.

Edit: With ~200 rooms, switching spaces sometimes takes upwards of 30 seconds.

Smartphone (please complete the following information):

  • Device: Google Pixel 3a
  • OS: LineageOS 15.1

Additional context

  • App version and store: 1.1.14 - F-Droid
  • Homeserver: robin.town

robintown avatar Aug 13 '21 13:08 robintown

Similar experience on Motorola G7 plus

SimonBrandner avatar Aug 13 '21 14:08 SimonBrandner

This seems to go away for me after I clear my cache but quickly comes back which I find quite odd, are there any guesses at what could be the cause of this? Are we the only people experiencing this?

SimonBrandner avatar Oct 31 '21 19:10 SimonBrandner

I'm also experiencing this issue but even worst. It can rakes tens of seconds for the switch to a new space actually happen.

Element Version 1.3.14 [40103142] (G-b5463) Phone : one plus AC2003

zaibon avatar Jan 19 '22 20:01 zaibon

I am experiencing this too. Switching spaces is extremely slow, sometimes takes minutes or does not work at all. Clearing the cache does not help. This is especially annoying, since somehow the active space gets randomly switch around (or by opening via notifications?) and I always need to switch back to home.

Version: 1.4.2 Phone: Samsung Galaxy S9

rda0 avatar Mar 09 '22 13:03 rda0

or by opening via notifications

Yep, I believe this is the case

Are we the only people seeing this?

SimonBrandner avatar Mar 09 '22 14:03 SimonBrandner

I am experiencing this too. Switching spaces is extremely slow, sometimes takes minutes or does not work at all. Clearing the cache does not help. This is especially annoying, since somehow the active space gets randomly switch around (or by opening via notifications?) and I always need to switch back to home.

Version: 1.4.2 Phone: Samsung Galaxy S9

Deleting cache, storage, completely reinstalling the app and logging in a new session resolved the problem. It is now taking me mostly less than 1s to switch spaces.

rda0 avatar May 31 '22 15:05 rda0

The issue has been resolved for me as well - I had to switch to a different account which seems to have done the trick.

Is anyone else still seeing this?

SimonBrandner avatar May 31 '22 20:05 SimonBrandner

I am currently seeing general slowness across the entire app, which would suggest memory issues of some sort. Not sure whether that counts as this issue.

robintown avatar May 31 '22 20:05 robintown

I am currently seeing general slowness across the entire app, which would suggest memory issues of some sort. Not sure whether that counts as this issue.

Could be related to https://github.com/vector-im/element-android/issues/6027

SimonBrandner avatar Jun 01 '22 04:06 SimonBrandner

By disabling threads, I've now definitely gotten the app to a place where it is responsive overall, but still slow (1~10 seconds) to switch spaces.

robintown avatar Jul 15 '22 10:07 robintown

By disabling threads, I've now definitely gotten the app to a place where it is responsive overall, but still slow (1~10 seconds) to switch spaces.

For me, space switching has dramatically improved after my account migration from matrix.envs.net to element.io though now I am experiencing very slow syncs...

SimonBrandner avatar Jul 15 '22 10:07 SimonBrandner

I think sync might actually be the reason. On my device I have these logs on every sync:

2022-07-14T14:29:35*770GMT+00:00Z 27693 V/ /Tag: ## SPACES: Finish checking room hierarchy in 1254 ms

The performance is much better if I go in airplane mode. I looked at the code a bit and my theory is that the space hierarchy calculation gets a lot slower the more users you have lazy loaded. That would explain why it's fast after an initial sync.

timokoesters avatar Aug 13 '22 14:08 timokoesters