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

[BUG] (web & mobile) Map loading very slowly with a lot of assets #4174

Open
2 of 3 tasks
klejejs opened this issue Sep 22, 2023 · 14 comments
Open
2 of 3 tasks

[BUG] (web & mobile) Map loading very slowly with a lot of assets #4174

klejejs opened this issue Sep 22, 2023 · 14 comments
Labels
bug Something isn't working needs triage Bug that needs triage from maintainer

Comments

@klejejs
Copy link
Contributor

klejejs commented Sep 22, 2023

The bug

I have more than 70k of assets and since adding more and more of them, I have noticed that the map is loading slower with more assets.

I assume this is due to all assets being preloaded on the map open, it would be nice if only the approximate counts were loaded in larger zoom levels and specific assets only when the map is zoomed in.

The OS that Immich Server is running on

Ubuntu 22.04, iOS 17

Version of Immich Server

v1.79.0

Version of Immich Mobile App

v1.79.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

1. Upload many assets
2. Open map on mobile or web
3. See that it takes very long for the map to load

Additional information

No response

@klejejs klejejs added bug Something isn't working needs triage Bug that needs triage from maintainer labels Sep 22, 2023
@jrasm91
Copy link
Contributor

jrasm91 commented Sep 22, 2023

The way the clustering UI feature works it needs all the assets up front. The alternative is probably a different tool or custom approach. Can you confirm that the API endpoint returns quickly and the clustering and rendering is what is slow?

@klejejs
Copy link
Contributor Author

klejejs commented Sep 22, 2023

Yes, that indeed is the case. The request takes 3 - max 5 seconds, and after that, it takes at least 10 seconds for something to show up. Furthermore, I believe it is still doing something in the background as the page hangs and it needs to be refreshed to navigate to a different page.

@HarHarLinks
Copy link

I'm facing the same issue with only 3000 assets, of which probably less than 1000 are geotagged at all.

@d3vv3
Copy link

d3vv3 commented Sep 27, 2023

Same here, 17k assets, with about 2k geotagged.

When I open the map, it loads only ~200 assets, but I know there are a load more (I have seen them in the map before in previously). It keeps loading and the webUI freezes (I have to refresh or go to another page). I also noticed the "Storage" on the bottom left keeps loading and never finishes on the map page. When I refresh into the timeline, it works fine again.

On mobile it behaves the same way, although if I select only "Show Favorite Only", it works perfectly.

2023-09-28-102703_998x804_scrot

2023-09-28-102847_647x486_scrot

@dodg3r
Copy link

dodg3r commented Oct 24, 2023

I think I'm experiencing the same problem.
My wife has 130,000 photos and when she logs in the ui hangs
If you are quick and click on e.g. people, you can make it not hang.
If you go back to photos, it hangs again.
I can also see that my browser eats up my ram.
There is no load on the server.

If I login with my user that has about 30 000 photos then it works and is fast and no delays what so ever.

@jrasm91
Copy link
Contributor

jrasm91 commented Oct 24, 2023

I'm guessing you may have some bad data that is causing an issue.

Specifically, the network request to load gps data will probably contain assets with null.

@dodg3r
Copy link

dodg3r commented Oct 24, 2023

Ok. I have the heap out of memory issue as well so I followed your advice emptying geocoding folder without success.
How do I proceed with this?
Should I start a new issue?

@jrasm91
Copy link
Contributor

jrasm91 commented Oct 24, 2023

This issue is for tracking the map rendering being slow with lots of assets. Unrelated to that is the map not working because of bad data. Also unrelated is the microservices container running out memory and crashing. Those are three separate and independent issues. Yes, you can open a new issue for the bad data in the map, since there are already existing issues for the other two.

@jrasm91
Copy link
Contributor

jrasm91 commented Nov 23, 2023

Is this still an issue with the new map provider?

@HarHarLinks
Copy link

My map is writing fine now, but I don't have "a lot of assets" compared to some other reporters.

@klejejs
Copy link
Contributor Author

klejejs commented Nov 23, 2023

@jrasm91 Thanks for the improvements! The web experience is much smoother now and the map loads very quickly. On mobile, it works OK as soon as it loads, but it still takes about 10-15secs to do that.

@jrasm91
Copy link
Contributor

jrasm91 commented Nov 23, 2023

Yeah it is still all rendered clientside.

@klejejs
Copy link
Contributor Author

klejejs commented Jan 19, 2024

Thanks for the map improvements! In the latest release on mobile the map now loads in much quicker. Unfortunately, another issue appears now - every time I try to move the map, or zoom it, it hangs for about 10secs before compleating the action.

@shadowempire123
Copy link

shadowempire123 commented Feb 28, 2024

Hi,
having the same issues but way worse.
Map on app hangs for ~2 minutes, scrolling, zooming -> app hangs for ~2 minutes
-> actually unusable

~200.000 assets
immich 1.96.0 in docker on QNAP TS-646
iphone app 1.96.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Bug that needs triage from maintainer
Projects
None yet
Development

No branches or pull requests

6 participants