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

Slow Media Tab View #10882

Open
4 tasks done
AndyXheli opened this issue Oct 21, 2022 · 14 comments
Open
4 tasks done

Slow Media Tab View #10882

AndyXheli opened this issue Oct 21, 2022 · 14 comments
Labels
approved bug feature: media tab Media tab performance: general/non-specific lag, ANR, etc and rarer exceptions/errors that don't have their own labels

Comments

@AndyXheli
Copy link

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

Since this was implemented the media tab got really slow and dose not work. Photos take a long time to load, app freezes.
#10008

This seems to happen more on users that have a lot of photos my users has 45GB + of photos and videos

Expected behaviour

Should load images on the snap like the IOS client dose.

Actual behaviour

Slow and laggy

Android version

12

Device brand and model

SM-G996U1

Stock or custom OS?

Stock

Nextcloud android app version

3.22.1

Nextcloud server version

24.0.6

Using a reverse proxy?

No

Android logs

No response

Server error logs

No response

Additional information

No response

@AndyXheli AndyXheli added the bug label Oct 21, 2022
@AlvaroBrey AlvaroBrey added the performance: general/non-specific lag, ANR, etc and rarer exceptions/errors that don't have their own labels label Oct 21, 2022
@omnath0
Copy link

omnath0 commented Oct 30, 2022

It's super slow specially after the last update and crashed everytime on Samsung S20/22.

@svenb1234
Copy link

And it flickers because it recalculates the view over and over again.

@AlvaroBrey AlvaroBrey self-assigned this Nov 17, 2022
@digitaltechconsult
Copy link
Contributor

I have a local NextCloud instance accesible from the phone via WiFi. I used NextCloud on iOS and usually I selected to see only the photos from the current year. But on Android this is slow and it puzzles me, since they are already synced and saved offline on the device, so the the issue it doesn't seem related to transfer speed, but with the view rendering.

@AndyXheli
Copy link
Author

AndyXheli commented Dec 2, 2022

Im still having alot of issues with this even with #11082 applied to 3.23.0 it did not fix anything for me

Please see attached recording, For me the Media tab is completely unusable. Hopefully there's a higher property on this as the app comply crashes

Screen_Recording_20221202_093925_Nextcloud.mp4

@AndyXheli
Copy link
Author

Hi @AlvaroBrey just wanted to give you a quick update on this issue seems like it's a little better on loading the media on Version 3.23.1 but still lags and freezes

@invario
Copy link

invario commented Jan 14, 2023

I have lots of photos. And in my years (yes, years) of using the app, it hasn't worked right, ever.

The file browser view doesn't work either. Same issue with slowness to the point of Android saying the all isn't responding.

It's been reported numerous times before and either the developers can't or won't fix it. I've given up and installed the Memories app within NC instead and use the browser interface. It is lightning fast once you index everything:
https://github.com/pulsejet/memories

If you insist on an app, this works quite well too:
https://gitlab.com/nkming2/nc-photos

@AndyXheli
Copy link
Author

I started using the nc-photos for android works like a charm they way the Nextcloud App should.

Thanks I'll also check the memories all as well.

I really hope there is a resolution on this soon

@Anvil5465
Copy link

Just wanted to bump this- the media tab is basically unusable on my phone (roughly 90 GB of photos and videos, Pixel 6a with GrapheneOS, Android 13, server version 25, client version 3.23.1). The app crashes constantly. When it doesn't crash, it's extremely slow, and I constantly get the "Nextcloud isn't responding" popup. The error message shows very high CPU usage from Nextcloud, typically 60-80%.

@mkiah
Copy link

mkiah commented Jan 20, 2023

I'm having the same issues. I originally thought it was an issue with preview generation, so I configured that on the server and it's set up to generate previews every 10 minutes.

If I access the Nextcloud media area from Firefox mobile, everything loads quickly. On the same device, previews in the app don't seem to load at all, and the app will crash regularly. So, it seems like an issue unique to the app.

App version: 3.23.1
Server version: 25.0.2
Android: 13
Phone: Pixel 6
Build: TP1A.221105.002

VID_20230119_203510_205.mp4

Happy to do a deeper dive if that'll help, I just need some direction.

P.S. enjoy the cat pictures I guess.

@AndyXheli
Copy link
Author

I agree I have preview generator running as well and I don't have any issues via web or via iOS nextcloud. I just wish there was a higher priority on this due to the age of the issue and if you look there's so many other issues regarding the same matter for years now. If the iOS nextcloud can do it, the android should too. It's a shame because it ruins the experience of the app 😕

@svenb1234
Copy link

On the same device, previews in the app don't seem to load at all

That's #10389

@AndyXheli
Copy link
Author

AndyXheli commented Jan 20, 2023

So as soon as i open the media tab on the android app cpu on the server spikes high 17% to 25% and my server has 28 cores & 24gb of ram on it looks like the Android app might be trying to generate the pictures and video's and not using the app data previews ? I tired the same progress on the ios app CPU was between 1% to 5% and photos load on the fly.

Also the photos on the android app never cache every time the media tab is open it populates them. It wont not be like that. The app should populate the media for the first time and once its done so it should not populate them again unless there's a change this is how iOS app works.

AlvaroBrey pushed a commit that referenced this issue Jan 24, 2023
Signed-off-by: eraser2021999 <bcoticopol@gmail.com>

Fixed unresponsiveness of the Media Tab (Photo Gallery) - more fluent scrolling.
- implemented query search via created column and not modified to avoid cases when an older modified photo is display wrongly in the chronology;
- changed some logic in media loading to improve the loading speed of the gallery;

Not fixed:
- some issue with selecting a custom folder as gallery folder, I'm unsure if it worked correctly or not since the application crashed a lot;
- some UI issues with the gallery display rectangles;

Signed-off-by: Bogdan Coticopol <bcoticopol@gmail.com>
@AlvaroBrey AlvaroBrey mentioned this issue Jan 24, 2023
1 task
AlvaroBrey pushed a commit that referenced this issue Jan 26, 2023
Signed-off-by: Bogdan Coticopol <bcoticopol@gmail.com>
- Workaround to improve gallery performance by eliminating the startDate from the query;
- Fixed a bug when the gallery would reset after playing a movie (searchAndDisplay);
@digitaltechconsult
Copy link
Contributor

I have created a pull request (#11321) with a fix for this issue. The initial tests look promising, maybe some other folks could test it further and provide feedback.

PS: Thank you @starypatyk, @AlvaroBrey and @szaimen for the assistance.

@AndyXheli
Copy link
Author

Still an issue. I think the media tab needs redo. Currently I'm using the photos app for nextcloud. Maybe there can me something similar to this build into the app just a suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved bug feature: media tab Media tab performance: general/non-specific lag, ANR, etc and rarer exceptions/errors that don't have their own labels
Projects
None yet
Development

No branches or pull requests

8 participants